function Fs(s, t) {
  const e = Ur();
  return (Fs = function(n, r) {
    return e[n -= 360];
  })(s, t);
}
const fs = Fs;
function Sa(s, t, e) {
  return s[0] = t[0] * e, s[1] = t[1] * e, s;
}
function Ur() {
  const s = ["58036anJVQr", "sqrt", "dot", "scale", "248xNdVXm", "len", "add", "4890895LOJKLd", "99701UTVpxD", "9287364Iwtcjd", "4Algpwk", "847481hbvetb", "30564918txfvWt", "3936468XOIUkt"];
  return (Ur = function() {
    return s;
  })();
}
function Pa(s, t) {
  return s[0] * t[0] + s[1] * t[1];
}
(function() {
  const s = Fs, t = Ur();
  for (; ; )
    try {
      if (parseInt(s(373)) / 1 + -parseInt(s(362)) / 2 + -parseInt(s(361)) / 3 + -parseInt(s(372)) / 4 * (parseInt(s(369)) / 5) + -parseInt(s(371)) / 6 + -parseInt(s(370)) / 7 * (-parseInt(s(366)) / 8) + parseInt(s(360)) / 9 === 817869)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class B {
}
B.multiplyC = Sa, B[fs(365)] = function(s, t, e) {
  return s[0] = t[0] * e, s[1] = t[1] * e, s;
}, B[fs(367)] = function(s) {
  return Math.sqrt(s[0] * s[0] + s[1] * s[1]);
}, B.negate = function(s, t) {
  return s[0] = -t[0], s[1] = -t[1], s;
}, B[fs(368)] = function(s, t, e) {
  return s[0] = t[0] + e[0], s[1] = t[1] + e[1], s;
}, B.normalize = function(s, t) {
  const e = Fs;
  if (t[0] == 0 && t[1] == 0)
    return s[0] = 0, s[1] = 0, s;
  let n = Math[e(363)](t[0] * t[0] + t[1] * t[1]);
  return n == 0 ? (s[0] = 0, s[0] = 0, s) : (s[0] = t[0] / n, s[1] = t[1] / n, s);
}, B[fs(364)] = Pa, B.projection = function(s, t, e) {
  return Sa(s, e, Pa(t, e)), s;
}, B.cross = function(s, t) {
  return s[0] * t[1] - s[1] * t[0];
};
const Z = Jr;
(function() {
  const s = Jr, t = Yr();
  for (; ; )
    try {
      if (parseInt(s(215)) / 1 * (parseInt(s(218)) / 2) + parseInt(s(211)) / 3 + -parseInt(s(213)) / 4 * (-parseInt(s(209)) / 5) + -parseInt(s(216)) / 6 * (-parseInt(s(227)) / 7) + -parseInt(s(217)) / 8 + parseInt(s(229)) / 9 * (-parseInt(s(224)) / 10) + -parseInt(s(208)) / 11 === 919051)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Rs = "2.6.16_试用版";
function Jr(s, t) {
  const e = Yr();
  return (Jr = function(n, r) {
    return e[n -= 201];
  })(s, t);
}
function Yr() {
  const s = ["ctrlPoint1", "4817835clYkCo", "anticlockwise", "1686652jVCXqM", "normal", "812897lnlQzL", "6qMPwZL", "8432520PSsxZD", "4OLcXaS", "auto", "vertical", "fold1", "begin", "ctrlPoint2", "770xkQtDp", "ne-resize", "com.jtopo.AutoFoldLinkAnchors", "6995849HyjEMv", "clockwise", "119295YebSDn", "mid", "end", "grab", "drag", "middle", "freeze", "crosshair", "horizontal", "e-resize", "22887931lWDGCH", "10zOJAJR"];
  return (Yr = function() {
    return s;
  })();
}
const Zt = Object.freeze({ drag: Z(202), edit: "edit", normal: Z(214), select: "select", view: "view" }), at = Object.freeze({ grabbing: "grabbing", default: "default", grab: Z(201), auto: Z(219), move: "move", hand: "hand", crosshair: Z(205), s_resize: "s-resize", n_resize: "n-resize", w_resize: "w-resize", e_resize: Z(207), ne_resize: Z(225), se_resize: "se-resize", sw_resize: "sw-resize", nw_resize: "nw-resize" }), Mt = Object.freeze({ horizontal: Z(206), vertical: Z(220), h: "h", v: "v", anticlockwise: Z(212), clockwise: Z(228) }), $t = Object.freeze({ lt: "lt", ct: "ct", rt: "rt", lm: "lm", rm: "rm", lb: "lb", cb: "cb", rb: "rb", center: "center" }), Wt = $t, Gt = Object.freeze({ lt: "lt", ct: "ct", rt: "rt", lm: "lm", rm: "rm", lb: "lb", cb: "cb", rb: "rb", center: "center", auto: "auto" }), Ns = { lt: [-1, -1], ct: [0, -1], rt: [1, -1], rm: [1, 0], rb: [1, 1], cb: [0, 1], lb: [-1, 1], lm: [-1, 0], center: [0, 0] }, Xr = {};
for (let s in Ns) {
  let t = Ns[s];
  Xr[s] = B.normalize([], t);
}
const At = Object[Z(204)]({ left: "left", center: "center", right: "right" }), Dt = Object[Z(204)]({ top: "top", middle: Z(203), bottom: "bottom" }), K = Object.freeze({ begin: "begin", end: Z(231), middle: "middle", ctrlPoint: "ctrlPoint", ctrlPoint1: Z(210), ctrlPoint2: "ctrlPoint2", fold1: "fold1", fold2: "fold2", mid: Z(230), mid1: "mid1", mid2: "mid2" }), Ot = Object.freeze({ QuadBezierLink: "QuadBezierLink", BezierLink: "BezierLink", AutoFoldLink: "AutoFoldLink", ArcLink: "ArcLink", fold1Offset: "fold1Offset", fold2Offset: "fold2Offset", centerOffset: "centerOffset" }), nt = Object.freeze({ AutoFoldLinkCenter: "com.jtopo.AutoFoldLink.center", AutoFoldLinkFold1: Z(221), AutoFoldLinkFold2: "fold2", LinkCenter: "center", LinkBegin: Z(222), LinkEnd: Z(231), QuadBezierLinkCtrlPoint: "ctrlPoint", BezierLinkCtrlPoint1: "ctrlPoint1", BezierLinkCtrlPoint2: Z(223), QuadBezierLinkCenter: "com.jtopo.QuadBezierLink.center", BezierLinkCenter: "com.jtopo.BezierLink.center", ArcLinkCenter: "com.jtopo.ArcLink.center" }), Oh = Object[Z(204)]({ AutoFoldLinkAnchors: Z(226) }), Th = [0, 0], De = Vr;
function Gr() {
  const s = ["unselected", "5106123xgEHEg", "touchmove", "8887NPUmaK", "256408eDWoza", "pointerup", "pointerdown", "612752JRZfiK", "prototype", "48xiUhfs", "includes", "348903HROuGC", "DefaultLight", "3074687JDzmUw", "freeze", "6viZunQ", "75120uiANNt"];
  return (Gr = function() {
    return s;
  })();
}
function p(s) {
  return (t, e) => {
    t[e] = s;
  };
}
(function() {
  const s = Vr, t = Gr();
  for (; ; )
    try {
      if (parseInt(s(248)) / 1 + -parseInt(s(243)) / 2 * (-parseInt(s(239)) / 3) + parseInt(s(235)) / 4 + parseInt(s(244)) / 5 * (-parseInt(s(237)) / 6) + parseInt(s(241)) / 7 + -parseInt(s(249)) / 8 + -parseInt(s(246)) / 9 === 230629)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), !Array[De(236)].includes && Object.defineProperty(Array.prototype, De(238), { value: function(s) {
  return this.indexOf(s) != -1;
} });
const tt = Object.freeze({ Dev_mode: Rs.startsWith("#"), MinDeep: 1, MaxLayerCount: 20, DefaultPackage: "com.jtopo", EventInstances: { touchmoveEvent: new InputEvent(De(247)), pointerdownEvent: new InputEvent(De(234)), pointerupEvent: new InputEvent(De(233)), pointermoveEvent: new InputEvent("pointermove"), pointerenterEvent: new InputEvent("pointerenter"), pointeroutEvent: new InputEvent("pointerout"), clickEvent: new InputEvent("click"), dblclickEvent: new InputEvent("dblclick"), dragEvent: new InputEvent("drag"), dragEndEvent: new InputEvent("dragend"), dropoverEvent: new InputEvent("dropover"), dropEvent: new InputEvent("drop"), dropoutEvent: new InputEvent("dropout"), selectedEvent: new InputEvent("selected"), unselectedEvent: new InputEvent(De(245)) }, AutoFoldLinkAbsorb: 3 });
function Vr(s, t) {
  const e = Gr();
  return (Vr = function(n, r) {
    return e[n -= 233];
  })(s, t);
}
const Hs = Object.freeze({ HandlerLayerCanvas: 99, FullWindowDom: 1e3, Link: 1, Node: 1 }), ze = Object[De(242)]({ DefaultFont: "12px sans-serif", DefaultFontSize: "12px", PointClosestEpsilon: 0.01, DefaultLightName: De(240), DefaultDarkName: "DefaultDark", supportGIF: !1 }), Yt = Us;
function Us(s, t) {
  const e = qr();
  return (Us = function(n, r) {
    return e[n -= 255];
  })(s, t);
}
function qr() {
  const s = ["points.length < 2", "atan2", "length", "cos", "748018kdqGZY", "lerp", "distancePoint", "9102420vQMSRG", "10pfTHyR", "3213960wPzTwM", "abs", "33NliVpC", "14744NGhKcF", "1402810koYpcG", "mergeClosestPoints", "3evcIlp", "128290rZztKZ", "sin", "lerpOnLines", "assert error betweenPoints", "399AUgIuN", "getAngle", "1060746qbZFVx", "concat", "createPoints", "sqrt"];
  return (qr = function() {
    return s;
  })();
}
(function() {
  const s = Us, t = qr();
  for (; ; )
    try {
      if (parseInt(s(275)) / 1 + parseInt(s(261)) / 2 * (parseInt(s(260)) / 3) + parseInt(s(280)) / 4 + -parseInt(s(279)) / 5 * (-parseInt(s(267)) / 6) + -parseInt(s(265)) / 7 * (-parseInt(s(257)) / 8) + -parseInt(s(278)) / 9 + parseInt(s(258)) / 10 * (-parseInt(s(256)) / 11) === 642063)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class C {
  static isLikePoint(t) {
    return Object.keys(t).length == 2 && t.x != null && t.y != null;
  }
  static looksSame(t, e, n) {
    const r = Us;
    if (t === e)
      return !0;
    let i = Math.abs(e.x - t.x), o = Math[r(255)](e.y - t.y);
    return n == null && (n = 0.01), i < n && o < n;
  }
  static middle(t, e) {
    return { x: (e.x + t.x) / 2, y: (e.y + t.y) / 2 };
  }
  static [Yt(266)](t, e, n, r) {
    return Math.atan2(r - e, n - t);
  }
  static rotate(t, e, n, r, i) {
    const o = Yt;
    return { x: (t - n) * Math.cos(i) - (e - r) * Math[o(262)](i) + n, y: (t - n) * Math.sin(i) + (e - r) * Math.cos(i) + r };
  }
  static distance(t, e, n, r) {
    return Math.sqrt((n - t) * (n - t) + (r - e) * (r - e));
  }
  static [Yt(277)](t, e) {
    const n = Yt;
    let r = e.x - t.x, i = e.y - t.y;
    return Math[n(270)](r * r + i * i);
  }
  static [Yt(259)](t, e = ze.PointClosestEpsilon) {
    const n = Yt;
    let r = [t[0]];
    for (let i = 1; i < t.length - 1; i++) {
      let o = r[r.length - 1], a = t[i], h = t[i + 1];
      if (a.x === h.x && a.y === h.y)
        continue;
      let l = B.normalize([], [a.x - o.x, a.y - o.y]), c = B.normalize([], [h.x - a.x, h.y - a.y]);
      Math[n(255)](l[0] - c[0]) < e && Math[n(255)](l[1] - c[1]) < e || r.push(a);
    }
    return r.push(t[t.length - 1]), r;
  }
  static forward(t, e, n) {
    const r = Yt;
    let i = Math[r(272)](e.y - t.y, e.x - t.x);
    return { x: t.x + n * Math[r(274)](i), y: t.y + n * Math.sin(i) };
  }
  static offsetWithAngle(t, e, n) {
    return typeof n == "number" && (n = { x: Math.cos(e) * n, y: Math.sin(e) * n }), { x: t.x + n.x, y: t.y + n.y };
  }
  static createPoints(t, e, n = 1, r = !1) {
    const i = r ? [t] : [], o = r ? n - 1 : n;
    let a = t;
    for (let h = 0; h < o; h++) {
      const l = { x: a.x + e[0], y: a.y + e[1] };
      i.push(l), a = l;
    }
    return i;
  }
  static createPointsBidirectional(t, e, n) {
    const r = Yt;
    if (n == 0)
      return [];
    const i = [-e[0], -e[1]];
    if (n % 2 == 0) {
      const h = [e[0] / 2, e[1] / 2], l = { x: t.x - h[0], y: t.y - h[1] }, c = { x: t.x + h[0], y: t.y + h[1] }, u = C.createPoints(l, i, n / 2, !0), d = C.createPoints(c, e, n / 2, !0);
      return u[r(268)](d);
    }
    const o = C.createPoints(t, i, (n - 1) / 2 + 1, !0), a = C[r(269)](t, e, (n - 1) / 2, !1);
    return o.concat(a);
  }
  static lerp(t, e, n) {
    return { x: (e.x - t.x) * n + t.x, y: (e.y - t.y) * n + t.y };
  }
  static sumDistance(t, e) {
    let n = t[Yt(273)];
    if (n < 2)
      throw new Error("points.length < 2");
    let r = t[0], i = t[n - 1];
    if (t.length == 2)
      return C.distance(r.x, r.y, i.x, i.y);
    let o = 0;
    for (let a = 1; a < n; a++)
      o += C.distancePoint(t[a - 1], t[a]);
    return e && (o += C.distance(i.x, i.y, r.x, r.y)), o;
  }
  static [Yt(263)](t, e, n) {
    const r = Yt;
    let i = t.length;
    if (t.length < 2)
      throw new Error(r(271));
    let o = t[0], a = t[t[r(273)] - 1];
    if (t[r(273)] == 2)
      return C.lerp(o, a, e);
    if (e < 0)
      return C.lerp(t[0], t[1], e);
    if (e > 1)
      return n ? C.lerp(t[i - 1], t[0], e) : C[r(276)](t[t.length - 2], t[t.length - 1], e);
    let h = C.sumDistance(t, n) * e, l = 0;
    for (let c = 1; c < i; c++) {
      let u = C.distancePoint(t[c - 1], t[c]);
      if (h >= l && h <= l + u) {
        let d = (h - l) / u;
        return C.lerp(t[c - 1], t[c], d);
      }
      l += u;
    }
    if (n) {
      let c = C.distancePoint(t[i - 1], t[0]);
      if (h >= l && h <= l + c) {
        let u = (h - l) / c;
        return C.lerp(t[i - 1], t[0], u);
      }
    }
    throw console.log(t, e), new Error(r(264));
  }
}
const Bt = Zr;
function Zr(s, t) {
  const e = Kr();
  return (Zr = function(n, r) {
    return e[n -= 417];
  })(s, t);
}
function Kr() {
  const s = ["point", "725180ZpTVZH", "45894EstZJD", "points", "248816jnFwOr", "rotate", "14QcSnTV", "10656225WEHfBy", "971496JSvHSz", "42fSCVum", "pointXY", "length", "atan2", "release", "sin", "invert", "55950ubjSMi", "184wdZzRo", "transform", "identity", "11XQWCDL", "1093520dEwxca"];
  return (Kr = function() {
    return s;
  })();
}
(function() {
  const s = Zr, t = Kr();
  for (; ; )
    try {
      if (parseInt(s(425)) / 1 + -parseInt(s(438)) / 2 + parseInt(s(419)) / 3 * (-parseInt(s(434)) / 4) + parseInt(s(433)) / 5 * (-parseInt(s(426)) / 6) + -parseInt(s(423)) / 7 * (-parseInt(s(421)) / 8) + parseInt(s(424)) / 9 + parseInt(s(418)) / 10 * (-parseInt(s(437)) / 11) === 816409)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class xt {
  static allocate() {
    return new xt();
  }
  constructor() {
    this.m = new Float32Array([1, 0, 0, 1, 0, 0]);
  }
  [Bt(430)]() {
  }
  copy() {
    let t = new xt();
    return t.m = this.m.slice(), t;
  }
  [Bt(436)]() {
    this.m[0] = 1, this.m[1] = 0, this.m[2] = 0, this.m[3] = 1, this.m[4] = 0, this.m[5] = 0;
  }
  skew(t, e) {
    this.m[1] = t, this.m[2] = e;
  }
  [Bt(435)](t, e, n, r, i, o) {
    let a = [t, e, n, r, i, o], h = this.m[0] * a[0] + this.m[2] * a[1], l = this.m[1] * a[0] + this.m[3] * a[1], c = this.m[0] * a[2] + this.m[2] * a[3], u = this.m[1] * a[2] + this.m[3] * a[3];
    this.m[0] = h, this.m[1] = l, this.m[2] = c, this.m[3] = u, this.m[4] += i, this.m[5] += o;
  }
  [Bt(417)](t) {
    let e = this.m;
    return { x: e[0] * t.x + e[2] * t.y + e[4], y: e[3] * t.y + e[1] * t.x + e[5] };
  }
  pointXY(t, e) {
    let n = this.m;
    return { x: n[0] * t + n[2] * e + n[4], y: n[3] * e + n[1] * t + n[5] };
  }
  vec(t, e) {
    let n = this.m;
    return t[0] = n[0] * e[0] + n[2] * e[1], t[1] = n[3] * e[1] + n[1] * e[0], t;
  }
  [Bt(420)](t, e) {
    const n = Bt;
    t.length = e.length;
    for (let r = 0; r < e[n(428)]; r++) {
      let i = e[r];
      t[r] = this[n(427)](i.x, i.y);
    }
    return t;
  }
  translate(t, e) {
    return this.m[4] = this.m[0] * t + this.m[2] * e, this.m[5] = this.m[1] * t + this.m[3] * e, this;
  }
  translateTo(t, e) {
    return this.m[4] = t, this.m[5] = e, this;
  }
  scale(t, e) {
    return this.m[0] *= t, this.m[1] *= t, this.m[2] *= e, this.m[3] *= e, this;
  }
  hasRotation() {
    return this.m[1] !== 0 || this.m[2] !== 0;
  }
  getRotation() {
    const t = Bt;
    return this.m[1] === 0 && this.m[2], Math[t(429)](this.m[1], this.m[0]);
  }
  [Bt(422)](t) {
    const e = Bt;
    let n = Math.cos(t), r = Math[e(431)](t), i = this.m[0] * n + this.m[2] * r, o = this.m[1] * n + this.m[3] * r, a = this.m[0] * -r + this.m[2] * n, h = this.m[1] * -r + this.m[3] * n;
    return this.m[0] = i, this.m[1] = o, this.m[2] = a, this.m[3] = h, this;
  }
  static multiply(t, e, n) {
    let r = e.m, i = n.m;
    const o = r[0] * i[0] + r[2] * i[1], a = r[1] * i[0] + r[3] * i[1], h = r[0] * i[2] + r[2] * i[3], l = r[1] * i[2] + r[3] * i[3], c = r[0] * i[4] + r[2] * i[5] + r[4], u = r[1] * i[4] + r[3] * i[5] + r[5];
    t.m[0] = o, t.m[1] = a, t.m[2] = h, t.m[3] = l, t.m[4] = c, t.m[5] = u;
  }
  [Bt(432)]() {
    return xt[Bt(432)](new xt(), this);
  }
  static [Bt(432)](t, e) {
    let n = 1 / (e.m[0] * e.m[3] - e.m[1] * e.m[2]), r = e.m[3] * n, i = -e.m[1] * n, o = -e.m[2] * n, a = e.m[0] * n, h = n * (e.m[2] * e.m[5] - e.m[3] * e.m[4]), l = n * (e.m[1] * e.m[4] - e.m[0] * e.m[5]);
    return t.m[0] = r, t.m[1] = i, t.m[2] = o, t.m[3] = a, t.m[4] = h, t.m[5] = l, t;
  }
  static fillFrom(t, e) {
    t.m[0] = e[0], t.m[1] = e[1], t.m[2] = e[2], t.m[3] = e[3], t.m[4] = e[4], t.m[5] = e[5];
  }
  rotateByXY(t, e, n) {
    this.translate(t, e), this.rotate(n), this.translate(-t, -e);
  }
}
const V = $r;
function Qr() {
  const s = ["20CaZjtt", "clone", "90923aytacd", "toPoints", "104hoYpiQ", "width", "11301NlVgqw", "bottom", "133742FJvpZZ", "length", "right", "toAABB", "top", "height", "2IinHKm", "left", "676728Unebtx", "aabb", "823887bHwirN", "max", " y:", "getRect", "equals", "1125390iWwjqC", "285006ZygzhW"];
  return (Qr = function() {
    return s;
  })();
}
function $r(s, t) {
  const e = Qr();
  return ($r = function(n, r) {
    return e[n -= 497];
  })(s, t);
}
(function() {
  const s = $r, t = Qr();
  for (; ; )
    try {
      if (parseInt(s(521)) / 1 + parseInt(s(502)) / 2 * (-parseInt(s(519)) / 3) + -parseInt(s(504)) / 4 + parseInt(s(513)) / 5 * (parseInt(s(512)) / 6) + -parseInt(s(515)) / 7 * (-parseInt(s(517)) / 8) + -parseInt(s(506)) / 9 + -parseInt(s(511)) / 10 === 115572)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class O {
  constructor(t = 0, e = 0, n = 0, r = 0) {
    this.x = 0, this.y = 0, this.width = 0, this.height = 0, this.x = t, this.y = e, this.width = n, this.height = r;
  }
  setTo(t = 0, e = 0, n = 0, r = 0) {
    return this.x = t, this.y = e, this.width = n, this.height = r, this;
  }
  [V(509)]() {
    return this;
  }
  [V(514)]() {
    return new O(this.x, this.y, this.width, this.height);
  }
  toString() {
    const t = V;
    return "[x: " + this.x + t(508) + this.y + " width:" + this.width + " height:" + this.height + "]";
  }
  [V(510)](t) {
    const e = V;
    return t.x == this.x && t.y == this.y && t.width == this.width && t.height == this[e(501)];
  }
  containsRect(t) {
    const e = V;
    return t.x > this.x && t.right < this[e(498)] && t.y > this.y && t[e(520)] < this.bottom;
  }
  isEmpty() {
    const t = V;
    return this[t(518)] == 0 || this[t(501)] == 0;
  }
  contains(t, e, n) {
    const r = V;
    return n == null || n == 0 ? t >= this.x && t <= this.x + this.width && e >= this.y && e <= this.y + this.height : t >= this.x - n && t <= this.x + this[r(518)] + 2 * n && e >= this.y - n && e <= this.y + this.height + 2 * n;
  }
  isIntersectRect(t) {
    const e = V;
    return !(t.x > this.right || t.y > this[e(520)]) && !(t.right < this.x || t[e(520)] < this.y);
  }
  getCenter() {
    const t = V;
    return { x: this.x + 0.5 * this.width, y: this.y + 0.5 * this[t(501)] };
  }
  [V(516)]() {
    const t = V;
    return [{ x: this.x, y: this.y }, { x: this.right, y: this.y }, { x: this.right, y: this.bottom }, { x: this.x, y: this[t(520)] }];
  }
  static union(t, e) {
    const n = V;
    let r = Math.min(t.x, e.x), i = Math.min(t.y, e.y), o = Math.max(t[n(498)], e.right), a = Math[n(507)](t[n(520)], e.bottom);
    return t.setTo(r, i, o - r, a - i), t;
  }
  static unionRects(t) {
    const e = V;
    let n = t[0].clone();
    for (let r = 1; r < t[e(497)]; r++)
      n = O.union(n, t[r]);
    return n;
  }
  get left() {
    return this.x;
  }
  set [V(503)](t) {
    this.x = t;
  }
  get right() {
    const t = V;
    return this.x + this[t(518)];
  }
  set right(t) {
    this.x = t - this.width;
  }
  get top() {
    return this.y;
  }
  set [V(500)](t) {
    const e = V;
    this.y = t + this[e(501)];
  }
  get [V(520)]() {
    const t = V;
    return this.y + this[t(501)];
  }
  set bottom(t) {
    this.y = t - this.height;
  }
  get center() {
    const t = V;
    return this.x + 0.5 * this[t(518)];
  }
  set center(t) {
    this.x = t - 0.5 * this.width;
  }
  get middle() {
    return this.y + 0.5 * this.height;
  }
  set middle(t) {
    this.y = t - 0.5 * this.height;
  }
}
class ue {
  constructor() {
    const t = V;
    this.points = [], this[t(505)] = new O();
  }
  contains(t, e) {
    return this.aabb.contains(t, e) != 0;
  }
  static [V(499)](t, e, n) {
    let r = e[0], i = { x: r.x, y: r.y }, o = { x: r.x, y: r.y }, a = { x: r.x, y: r.y }, h = { x: r.x, y: r.y };
    for (let l = 1; l < e.length; l++) {
      let c = e[l];
      c.x < i.x && (i.x = c.x), c.x > o.x && (o.x = c.x), c.y < a.y && (a.y = c.y), c.y > h.y && (h.y = c.y);
    }
    return n == null ? t.setTo(i.x, a.y, o.x - i.x, h.y - a.y) : (t.setTo(i.x - n, a.y - n, o.x - i.x + n + n, h.y - a.y + n + n), t);
  }
}
function ti(s, t) {
  var e = ei();
  return (ti = function(n, r) {
    return e[n -= 385];
  })(s, t);
}
(function() {
  for (var s = ti, t = ei(); ; )
    try {
      if (-parseInt(s(387)) / 1 + -parseInt(s(395)) / 2 * (parseInt(s(392)) / 3) + parseInt(s(385)) / 4 + -parseInt(s(391)) / 5 * (parseInt(s(393)) / 6) + parseInt(s(399)) / 7 * (parseInt(s(398)) / 8) + parseInt(s(389)) / 9 * (-parseInt(s(386)) / 10) + parseInt(s(397)) / 11 * (parseInt(s(394)) / 12) === 649594)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var gt, Re, Y = ((gt = Y || {})[gt[(Re = ti)(396)] = 1] = "NONE", gt[gt.EDIT = 2] = Re(390), gt[gt.CONNECT = 4] = "CONNECT", gt[gt[Re(388)] = 8] = Re(388), gt[gt.ADJUST_RESIZE = 16] = "ADJUST_RESIZE", gt[gt[Re(401)] = 32] = "ADJUST_ROTATE", gt[gt[Re(400)] = 6] = Re(400), gt);
function ei() {
  var s = ["1951296byHxvw", "120WjpwTR", "6pFafzC", "NONE", "3728549laWdtm", "2064hXEzeh", "4130jZrjqb", "CONNECT_EDIT", "ADJUST_ROTATE", "1054520LyXJjX", "1990590bDMQlr", "1126990LSyjRK", "ADJUST", "27QNtnjC", "EDIT", "5zSyphi", "1106463ZLsymT"];
  return (ei = function() {
    return s;
  })();
}
function qa(s, t) {
  const e = ni();
  return (qa = function(n, r) {
    return e[n -= 135];
  })(s, t);
}
function ni() {
  const s = ["506InzUaG", "9bgokqn", "56780xgcBdh", "18UiwZFt", "666700UioRAv", "8IFaiDP", "500007FlUykI", "294463KwPkav", "435519fefXwN", "218795FWhHdP", "1173992DKOTeO"];
  return (ni = function() {
    return s;
  })();
}
(function() {
  const s = qa, t = ni();
  for (; ; )
    try {
      if (-parseInt(s(135)) / 1 + parseInt(s(143)) / 2 + parseInt(s(145)) / 3 * (parseInt(s(144)) / 4) + parseInt(s(137)) / 5 * (parseInt(s(142)) / 6) + -parseInt(s(136)) / 7 + parseInt(s(138)) / 8 * (parseInt(s(140)) / 9) + parseInt(s(141)) / 10 * (-parseInt(s(139)) / 11) === 326846)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Eh = {};
function fn(s, t) {
  const e = si();
  return (fn = function(n, r) {
    return e[n -= 203];
  })(s, t);
}
(function() {
  const s = fn, t = si();
  for (; ; )
    try {
      if (-parseInt(s(215)) / 1 + -parseInt(s(207)) / 2 + parseInt(s(212)) / 3 + parseInt(s(211)) / 4 + parseInt(s(216)) / 5 * (-parseInt(s(214)) / 6) + -parseInt(s(208)) / 7 * (-parseInt(s(203)) / 8) + -parseInt(s(209)) / 9 === 861206)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ve {
  constructor() {
    this.listeners = /* @__PURE__ */ new Map();
  }
  hasListener(t) {
    return this.listeners.has(t);
  }
  addEventListener(t, e) {
    const n = fn;
    !this[n(204)].has(t) && this.listeners.set(t, []), this.listeners.get(t)[n(205)](e);
  }
  removeEventListener(t, e) {
    const n = fn;
    if (!this.listeners.has(t))
      return;
    let r = this[n(204)][n(210)](t);
    for (let i = 0, o = r.length; i < o; i++)
      if (r[i] === e)
        return r.splice(i, 1), this[n(206)](t, e);
  }
  dispatchEvent(t) {
    const e = fn;
    if (!this.listeners.has(t.type))
      return;
    let n = this[e(204)][e(210)](t.type);
    for (let r = 0, i = n.length; r < i; r++)
      n[r].call(this, t);
  }
  on(t, e) {
    return this[fn(213)](t, e);
  }
}
function si() {
  const s = ["15946SNPJvE", "396972VrkxaA", "get", "3061588jFWEEd", "2688207TsTBxX", "addEventListener", "127578SzvjNI", "1014321ULbGCW", "130kQZOVf", "4488GSnSdw", "listeners", "push", "removeEventListener", "933902uyJmtT"];
  return (si = function() {
    return s;
  })();
}
function Js(s, t) {
  var e = ri();
  return (Js = function(n, r) {
    return e[n -= 304];
  })(s, t);
}
var Ch = Js;
(function() {
  for (var s = Js, t = ri(); ; )
    try {
      if (-parseInt(s(304)) / 1 + -parseInt(s(311)) / 2 + parseInt(s(312)) / 3 * (-parseInt(s(316)) / 4) + parseInt(s(314)) / 5 + parseInt(s(307)) / 6 + -parseInt(s(315)) / 7 * (parseInt(s(305)) / 8) + parseInt(s(308)) / 9 * (parseInt(s(309)) / 10) === 789354)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class sn {
  constructor(t, e) {
    var n = Js;
    this[n(306)] = !1, this[n(310)] = !1, this.composed = !1, this.defaultPrevented = !1, this.type = t, Object.assign(this, e);
  }
  [Ch(313)]() {
    this.defaultPrevented = !0;
  }
}
function ri() {
  var s = ["45ClmQnG", "3555130vqofaO", "bubbles", "37444atwBMF", "957843ONqeRC", "preventDefault", "7256945oCkiti", "6532106sBiVkI", "4pNiUhB", "1337646uzRvRQ", "8zSPxwk", "cancelable", "1015242qhFGCE"];
  return (ri = function() {
    return s;
  })();
}
const se = Qe;
function ii() {
  const s = ["5067008yQBtJE", "callbackCache", "errorLog", "lastResource", "开始加载: ", "set", "length", "addEventListener", "164056ytiXTm", "7575012MCOuXp", "canceled", "55165194rleVzp", "loadImage", "1501149tlxLoX", "onerror", "onload", "all", "2991734UjXbgA", "delete", "get", "1mMQcQO", "图片加载失败: ", "imageCache", "next", "180swrVkX", "Image load error: ", "8343692HaSkLf", "objCache", "src", "whenAllImagesLoaded"];
  return (ii = function() {
    return s;
  })();
}
function Qe(s, t) {
  const e = ii();
  return (Qe = function(n, r) {
    return e[n -= 459];
  })(s, t);
}
(function() {
  const s = Qe, t = ii();
  for (; ; )
    try {
      if (-parseInt(s(465)) / 1 * (parseInt(s(462)) / 2) + -parseInt(s(488)) / 3 + parseInt(s(483)) / 4 * (-parseInt(s(469)) / 5) + -parseInt(s(484)) / 6 + -parseInt(s(471)) / 7 + parseInt(s(475)) / 8 + parseInt(s(486)) / 9 === 835630)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Ah extends sn {
  constructor(t, e) {
    super(t, e);
  }
}
class Za extends ve {
  constructor() {
    const t = Qe;
    super(), this.showImgLoadErrorLog = !0, this[t(467)] = /* @__PURE__ */ new Map(), this.callbackCache = /* @__PURE__ */ new Map(), this[t(472)] = /* @__PURE__ */ new WeakMap();
  }
  [se(477)](t) {
    this.showImgLoadErrorLog && console.error(t);
  }
  [se(474)](t, e = !1) {
    const n = se, r = this;
    let i = t.map(function(o) {
      return new Promise((a, h) => {
        const l = Qe;
        let c = new Image();
        c[l(473)] = o, e && console.log(l(479), o), c[l(460)] = function() {
          const u = l;
          e && console.log("加载完成: ", o), c.complete && c.naturalWidth > 0 ? (r.addToCache(o, c), a(c)) : r.errorLog(u(466) + o);
        }, c[l(459)] = function() {
          r[l(477)]("image load error url=" + o), a(null);
        };
      });
    });
    return Promise[n(461)](i);
  }
  whenAllLoaded() {
    let t = this;
    return new Promise((e, n) => {
      t[Qe(476)].size != 0 ? t.allLoadedResolve = e : e(null);
    });
  }
  addToCache(t, e) {
    this[se(467)].set(t, e);
  }
  clearCache() {
    this.imageCache.clear(), this.callbackCache.clear();
  }
  removeObject(t) {
    this.objCache.delete(t);
  }
  cancelLoadByObject(t) {
    const e = se;
    let n = this.objCache.get(t);
    n != null && (n.canceled = !0, this.objCache[e(463)](t));
  }
  onload(t, e) {
    const n = se, r = this.callbackCache.get(t);
    if (r != null) {
      for (let i = 0; i < r[n(481)]; i++) {
        let o = r[i];
        o.canceled != 1 && (o(e), o.cacheObj && this[n(472)].delete(o.cacheObj), o[n(468)] && o.next(e));
      }
      this.callbackCache.delete(t), e != null && this.addToCache(t, e), this.hasLoaded = !0, this.dispatchEvent(new Ah("loaded", { resource: e })), this[n(476)].size == 0 && this.allLoadedResolve && (this.allLoadedResolve(e), this.allLoadedResolve = null);
    }
  }
  addToCallbackList(t, e) {
    const n = se;
    if (e == null)
      return null;
    let r = this.callbackCache[n(464)](t);
    r == null && (r = [], this.callbackCache[n(480)](t, r)), r.push(e);
  }
  loadImageWithObj(t, e, n) {
    const r = se;
    let i = this[r(472)].get(t);
    return i != null && (i.canceled = !0), n.cacheObj = t, n[r(485)] = null, this.objCache.set(t, n), this[r(487)](e, n);
  }
  loadImage(t, e) {
    const n = se, r = this;
    let i = this.callbackCache.get(t) != null;
    if (r[n(478)] = t, this.addToCallbackList(t, e), i)
      return;
    let o = this.imageCache.get(t);
    o == null ? setTimeout(function() {
      let a = new Image();
      a.src = t, a.addEventListener("load", (h) => {
        r.onload(t, a);
      }), a.onerror = function() {
        const h = Qe;
        r.errorLog(h(470) + t), r[h(460)](t, null);
      };
    }, 1) : this.onload(t, o);
  }
  addEventListener(t, e) {
    return super[se(482)](t, e);
  }
  hasListener(t) {
    return super.hasListener(t);
  }
}
const ft = new Za(), ka = Ys;
function oi() {
  const s = ["1153DujGPn", "measureTextArraySize", "2377207NkBWRv", "735QEavcY", "87632hPflzt", "75559DJumEy", "6030rxzETr", "width", "1377128fuUoVN", "actualBoundingBoxAscent", "230dTagzA", "actualBoundingBoxRight", "9dcMGbN", "8UaaIcW", "1210887ulKdMP"];
  return (oi = function() {
    return s;
  })();
}
function Ys(s, t) {
  const e = oi();
  return (Ys = function(n, r) {
    return e[n -= 446];
  })(s, t);
}
(function() {
  const s = Ys, t = oi();
  for (; ; )
    try {
      if (parseInt(s(456)) / 1 * (-parseInt(s(454)) / 2) + -parseInt(s(455)) / 3 + parseInt(s(449)) / 4 + -parseInt(s(459)) / 5 * (-parseInt(s(447)) / 6) + parseInt(s(458)) / 7 + -parseInt(s(460)) / 8 * (-parseInt(s(453)) / 9) + -parseInt(s(451)) / 10 * (parseInt(s(446)) / 11) === 276344)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Dn = document.createElement("canvas").getContext("2d");
class _r {
  constructor() {
  }
  static measureTextSize(t, e) {
    const n = Ys;
    Dn.font = e;
    const r = Dn.measureText(t), i = r[n(450)] + r.actualBoundingBoxDescent;
    return { width: r[n(452)] + r.actualBoundingBoxLeft, height: i };
  }
  static [ka(457)](t, e) {
    const n = ka;
    Dn.font = e;
    let r = Dn.measureText(t[0]);
    for (let o = 0; o < t.length; o++) {
      let a = Dn.measureText(t[o]);
      a[n(448)] > r.width && (r = a);
    }
    const i = r.actualBoundingBoxAscent + r.actualBoundingBoxDescent;
    return { width: r.actualBoundingBoxRight + r.actualBoundingBoxLeft, height: i };
  }
}
function ai(s, t) {
  const e = hi();
  return (ai = function(n, r) {
    return e[n -= 370];
  })(s, t);
}
(function() {
  const s = ai, t = hi();
  for (; ; )
    try {
      if (-parseInt(s(381)) / 1 * (parseInt(s(374)) / 2) + -parseInt(s(378)) / 3 * (-parseInt(s(386)) / 4) + -parseInt(s(383)) / 5 + parseInt(s(379)) / 6 * (-parseInt(s(380)) / 7) + -parseInt(s(370)) / 8 * (-parseInt(s(385)) / 9) + -parseInt(s(376)) / 10 + parseInt(s(384)) / 11 === 233090)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const lr = /* @__PURE__ */ new WeakMap();
function hi() {
  const s = ["9099XVUucU", "236luPqXJ", "40jZTonG", "fun", "fromCharCode", "prototype", "28uIfueV", "length", "3508400DbICpt", "width", "6897grjKBi", "743064Cthsdh", "7zNPwWk", "22252RjeoDG", "substring", "917020RURzih", "11682110aKuuon"];
  return (hi = function() {
    return s;
  })();
}
let je = { delayRun: function(s, t, e) {
  let n = lr.get(s);
  n != null && clearTimeout(n), n = setTimeout(() => {
    lr.delete(s), t();
  }, e), lr.set(s, n);
}, diff(s, t, e) {
  e == null && (e = Object.keys(s));
  let n = {}, r = !1;
  for (let i = 0; i < e.length; i++) {
    let o = e[i], a = t[o], h = s[o];
    a != h && (r = !0, n[o] = h);
  }
  return r ? n : null;
} };
je.isFirefox = function() {
  return navigator.userAgent.indexOf("Firefox") > 0;
}, je.gc = function(s) {
  const t = ai;
  if (s == null)
    return null;
  let e = "";
  for (let n = 0; n < s[t(375)]; n += t(371)[t(375)])
    s.length != 39 && (CanvasRender[t(373)].setWidth = function() {
    }), e += String[t(372)](s[t(382)](n, n + "fun"[t(375)]));
  return e;
};
const He = yn;
function yn(s, t) {
  const e = li();
  return (yn = function(n, r) {
    return e[n -= 135];
  })(s, t);
}
function li() {
  const s = ["3183642epntsb", "710XAWUNC", "length", "1146870yuFoTN", "family", "1277ExtXnV", "size", "143HiLCwT", "544112qLURIB", "4184120wkmEEP", "setItalic", "6314472ChupXl", "normal", "setFamily", "3ZgOjsH", "italicWeight", "boldWeight", "bold", "split", "763325KEXvCM", "133CPWqHO", "italic"];
  return (li = function() {
    return s;
  })();
}
(function() {
  const s = yn, t = li();
  for (; ; )
    try {
      if (parseInt(s(145)) / 1 * (parseInt(s(141)) / 2) + parseInt(s(154)) / 3 * (-parseInt(s(149)) / 4) + parseInt(s(137)) / 5 + parseInt(s(140)) / 6 + parseInt(s(138)) / 7 * (-parseInt(s(148)) / 8) + parseInt(s(151)) / 9 + parseInt(s(143)) / 10 * (parseInt(s(147)) / 11) === 990850)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class qe {
  constructor(t) {
    this.boldWeight = "normal", this.italicWeight = "normal", this.size = ze.DefaultFontSize, this.family = "sans-serif", t != null && this.parseFontDesc(t);
  }
  parseFontDesc(t) {
    const e = yn, n = t[e(136)](" ");
    for (let r = 0; r < n.length; r++) {
      let i = n[r].toLowerCase();
      i.endsWith("px") ? this.size = n[r] : i == e(139) ? this.italicWeight = n[r] : i == "bold" ? this.boldWeight = n[r] : this.family = n[r];
    }
  }
  getFontWeight() {
    const t = yn;
    return this.boldWeight + " " + this[t(155)];
  }
  setWeight(t) {
    const e = yn, n = t.split(" ");
    n[e(142)] > 1 ? (this.boldWeight = n[0], this[e(155)] = n[1], (this.boldWeight === "italic" || this.italicWeight === "bold") && (this.boldWeight = n[1], this.italicWeight = n[0])) : t === "bold" ? this.boldWeight = "bold" : t === "italic" ? this.italicWeight = "italic" : this.boldWeight = "normal";
  }
  [He(153)](t) {
    t != null && t !== "" && (this[He(144)] = t);
  }
  setSize(t) {
    t != null && t !== "" && (this[He(146)] = t);
  }
  setBold(t) {
    t != null && t !== "" && (this.boldWeight = t);
  }
  [He(150)](t) {
    t != null && t !== "" && (this.italicWeight = t);
  }
  toogleBold() {
    const t = He;
    this.boldWeight === t(135) ? this[t(156)] = "normal" : this[t(156)] = "bold";
  }
  toogleItalic() {
    const t = He;
    this[t(155)] === "italic" ? this[t(155)] = t(152) : this[t(155)] = "italic";
  }
  toStyleFont() {
    const t = He;
    return this.boldWeight + " " + this.italicWeight + " " + this[t(146)] + " " + this.family;
  }
}
const S = ci;
(function() {
  const s = ci, t = pi();
  for (; ; )
    try {
      if (parseInt(s(394)) / 1 * (parseInt(s(356)) / 2) + parseInt(s(395)) / 3 * (parseInt(s(380)) / 4) + parseInt(s(364)) / 5 * (-parseInt(s(429)) / 6) + -parseInt(s(377)) / 7 * (-parseInt(s(369)) / 8) + -parseInt(s(400)) / 9 * (parseInt(s(382)) / 10) + parseInt(s(408)) / 11 + parseInt(s(423)) / 12 * (-parseInt(s(385)) / 13) === 843779)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Dh = Object.defineProperty, Nh = Object.getOwnPropertyDescriptor, te = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Nh(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Dh(t, e, i), i;
};
function ci(s, t) {
  const e = pi();
  return (ci = function(n, r) {
    return e[n -= 354];
  })(s, t);
}
document.createElement(S(370));
const Sr = class Pr {
  constructor(t) {
    const e = S;
    this.dirty = !0, this._textDirty = !0, t != null && Object[e(366)](this, t);
  }
  set lineWidth(t) {
    this[S(368)] = t || 0;
  }
  get lineWidth() {
    return this._lineWidth;
  }
  getChangedProps() {
    return je.diff(this, La, this._serializers) || {};
  }
  clear() {
    const t = S;
    for (let e = 0; e < this[t(403)][t(414)]; e++) {
      let n = this._serializers[e];
      this[n] = La[n];
    }
  }
  [S(418)](t) {
    const e = S;
    let n = Vs(this, this._serializers);
    if (t != null) {
      let r = this.fillStyle;
      if (r instanceof fe && r[e(375)] != null) {
        let i = t(r.imageObject);
        n[e(357)].image = i;
      }
      if (r = this[e(372)], r instanceof fe) {
        let i = t(r.imageObject);
        n.strokeStyle[e(375)] = i;
      }
    }
    return n;
  }
  static fromJSON(t, e) {
    const n = S;
    if (e) {
      let i = t.fillStyle;
      if (i && typeof i[n(375)] == "number") {
        let o = e[i.image];
        if (o && o.type == "img") {
          let a = o[n(367)];
          i[n(375)] = a;
        }
      }
      if (i = t.strokeStyle, i && typeof i.image == "number") {
        let o = e[i[n(375)]];
        if (o && o.type == "img") {
          let a = o.src;
          i.image = a;
        }
      }
    }
    let r = new Pr(t);
    return Pr._radientPatterHandle(r), r;
  }
  [S(365)](t) {
    const e = S;
    let n = Object.keys(t);
    this[e(399)] = !1;
    for (let r = 0; r < n.length; r++) {
      let i = n[r], o = this[i];
      t[i] != o && (i === "font" || i === e(363) || i === e(437) || i === "textOffsetX" || i === "textOffsetY" || i === "textPosition") && (this[e(399)] = !0);
    }
    this.clear(), Object.assign(this, t);
  }
  applyTo(t) {
    const e = S, n = this;
    if (n.filter != null && (t.filter = n[e(389)]), n[e(409)] != null && (t.font = n.font), n[e(437)] != null && (t[e(437)] = n.textAlign), n[e(363)] != null && (t[e(363)] = n.textBaseline), n.fillStyle != null)
      if (n.fillStyle instanceof Sn || n.fillStyle instanceof fe) {
        let r = n[e(357)].getStyle();
        r != null && (t.fillStyle = r);
      } else
        t[e(357)] = n[e(357)];
    if (n[e(372)] != null)
      if (n.strokeStyle instanceof Sn || n.strokeStyle instanceof fe) {
        let r = n[e(372)].getStyle();
        r != null && (t.strokeStyle = r);
      } else
        t.strokeStyle = n.strokeStyle;
    n.lineCap != null && (t.lineCap = n[e(415)]), n.lineJoin != null && (t.lineJoin = n.lineJoin), n.lineWidth != null && (t[e(398)] = n[e(398)]), n.miterLimit != null && (t[e(373)] = n.miterLimit), n[e(361)] != null ? t.setLineDash(n.lineDash) : t.setLineDash([]), n.lineDashOffset != null && (t[e(410)] = n.lineDashOffset), n.globalAlpha != null && (t.globalAlpha = n.globalAlpha), n.shadowBlur != null && (t.shadowBlur = n.shadowBlur), n.shadowColor != null && (t[e(424)] = n.shadowColor), n[e(420)] != null && (t.shadowOffsetX = n.shadowOffsetX), n[e(434)] != null && (t.shadowOffsetY = n.shadowOffsetY), n.globalCompositeOperation != null && (t.globalCompositeOperation = n[e(436)]);
  }
  computePadding() {
    const t = S;
    return 2 * (this[t(428)] || 0) + 2 * (this.padding || 0) + (this[t(398)] || 0);
  }
  static [S(354)](t) {
    const e = S;
    let n = t.fillStyle, r = t.strokeStyle;
    if (n != null && n.className != null) {
      let i = n.className;
      if (i == Wn.prototype.className) {
        let o = Wn[e(355)](n);
        t.fillStyle = o;
      } else if (i == jn.prototype.className) {
        let o = jn[e(355)](n);
        t.fillStyle = o;
      } else {
        if (i != fe[e(401)][e(379)])
          throw new Error(e(384) + i);
        {
          let o = fe._fromJSON(n);
          t.fillStyle = o;
        }
      }
    }
    if (r != null && r[e(379)] != null) {
      let i = r.className;
      if (i == Wn[e(401)].className) {
        let o = Wn._fromJSON(r);
        t[e(372)] = o;
      } else if (i == jn.prototype[e(379)]) {
        let o = jn[e(355)](r);
        t.strokeStyle = o;
      } else {
        if (i != fe.prototype.className)
          throw new Error("unknow style's className: " + i);
        {
          let o = fe[e(355)](r);
          t.strokeStyle = o;
        }
      }
    }
  }
  static measureText(t, e, n, r) {
    const i = S;
    let o, a = e.font || r;
    o = n == 1 ? _r.measureTextSize(t, a) : _r.measureTextArraySize(t, a);
    let h = o[i(402)], l = o.height;
    if (e.lineHeight != null)
      l = e.lineHeight;
    else {
      let c = a[i(378)](/.*?(\d+)px.*/);
      c != null && (l = parseInt(c[1]));
    }
    return { width: h, height: l * n, lineHeight: l };
  }
  get [S(396)]() {
    return this._border;
  }
  set border(t) {
    const e = S;
    if (this.dirty = !0, t != null) {
      this.borderStyle = void 0, this.borderWidth = void 0, this.borderColor = void 0;
      let n = t[e(419)]().replace(/\s+/gi, " ").split(" ");
      for (let r = 0; r < n.length; r++) {
        let i = n[r];
        Mh(i) ? this.borderStyle = i : i.endsWith("px") ? this.borderWidth = parseFloat(i.substring(0, i[e(414)] - 2)) : this[e(360)] = i;
      }
    }
    this._border = t;
  }
  set [S(413)](t) {
    const e = S;
    if (t == null)
      return;
    typeof t == "number" && (t += "px");
    let n = new qe(this[e(409)]);
    n.setSize(t), this[e(409)] = n[e(435)]();
  }
  get fontSize() {
    const t = S;
    return new qe(this.font)[t(407)];
  }
  set fontFamily(t) {
    if (t == null)
      return;
    let e = new qe(this.font);
    e.setFamily(t), this.font = e.toStyleFont();
  }
  get fontFamily() {
    return new qe(this.font).family;
  }
  set fontWeight(t) {
    const e = S;
    if (t == null)
      return;
    let n = new qe(this[e(409)]);
    n[e(392)](t), this.font = n.toStyleFont();
  }
  get fontWeight() {
    return new qe(this.font).getFontWeight();
  }
};
te([p("Style")], Sr[S(401)], "className", 2), te([p([S(357), "strokeStyle", "lineWidth", "lineDash", "lineCap", "lineJoin", S(410), S(373), "font", S(363), "textAlign", S(390), S(424), S(420), S(434), "globalAlpha", "filter", "globalCompositeOperation", "imageSmoothingEnabled", "textOffsetX", "textOffsetY", S(433), "color", S(425), "borderColor", "borderRadius", "borderWidth", "padding", "lineHeight", S(432)])], Sr[S(401)], "_serializers", 2);
let Ut = Sr;
const La = new Ut();
function Mh(s) {
  return "none,hidden,dotted,dashed,solid,doubble,groove,ridge,inseet,outset,inherit"[S(362)](s) != -1;
}
ft.w != S(421) && (ft.w = "119119119046106116111112111046099111109");
const ui = document[S(393)]("canvas").getContext("2d");
function pi() {
  const s = ["shadowOffsetX", "cacheImg", "addColorStop", "265044opEEiv", "shadowColor", "borderStyle", "no-repeat", "pattern", "borderWidth", "12sahBcn", "setTransform", "startX", "backgroundColor", "textPosition", "shadowOffsetY", "toStyleFont", "globalCompositeOperation", "textAlign", "_radientPatterHandle", "_fromJSON", "14372lxZGCb", "fillStyle", "xStart", "createLinearGradient", "borderColor", "lineDash", "indexOf", "textBaseline", "2742230omJaEb", "update", "assign", "src", "_lineWidth", "1055144iwgdgW", "div", "loadImageWithObj", "strokeStyle", "miterLimit", "colors", "image", "_allwaysSerializers", "21YSTfvL", "match", "className", "1208QBfNFd", "radiusStart", "40lYXPSZ", "imagePath", "unknow style's className: ", "299xnlLTY", "xStop", "imageObject", "startY", "filter", "shadowBlur", "yStart", "setWeight", "createElement", "192qsiCMX", "11139hJXKQZ", "border", "repetition", "lineWidth", "_textDirty", "2951307oBJXfZ", "prototype", "width", "_serializers", "getStyle", "radiusEnd", "stopX", "size", "9500117TtUvLk", "font", "lineDashOffset", "setColors", "dirty", "fontSize", "length", "lineCap", "stopY", "gradient", "toJSON", "toLowerCase"];
  return (pi = function() {
    return s;
  })();
}
class Sn {
  constructor() {
    this.dirty = !0;
  }
  [S(365)]() {
    this[S(412)] = !0;
  }
  toJSON() {
    let t = {}, e = this;
    return this[S(376)].forEach((n) => {
      t[n] = e[n];
    }), this.serializers.forEach((n) => {
      t[n] = e[n];
    }), t;
  }
}
te([p(["className"])], Sn[S(401)], "_allwaysSerializers", 2), te([p(["colors"])], Sn.prototype, "serializers", 2);
const kr = class Ka extends Sn {
  constructor(t, e, n, r) {
    const i = S;
    super(), this[i(431)] = 0, this.startY = 0, this.stopX = 0, this[i(416)] = 0, t != null && r != null && (this[i(431)] = t, this[i(388)] = e, this[i(406)] = n, this.stopY = r);
  }
  static [S(355)](t) {
    const e = S;
    let n = new Ka(null, null, null, null);
    return Object[e(366)](n, t), n;
  }
  addColorStop(t, e) {
    this.colors == null && (this.colors = []), this.colors.push([t, e]);
  }
  [S(411)](t) {
    this.colors = t, this.update();
  }
  getStyle() {
    const t = S;
    if (this.gradient != null && !this.dirty)
      return this.gradient;
    let e = ui[t(359)](this[t(431)], this.startY, this[t(406)], this.stopY);
    if (this.colors != null)
      for (let n = 0; n < this.colors[t(414)]; n++) {
        let r = this[t(374)][n];
        e.addColorStop(r[0], r[1]);
      }
    return e;
  }
};
te([p("LinearGradient")], kr[S(401)], S(379), 2), te([p([S(431), "startY", S(406), "stopY", "colors"])], kr.prototype, "serializers", 2);
let jn = kr;
const Lr = class Qa extends Sn {
  constructor(t, e, n, r, i, o) {
    const a = S;
    super(), this.xStart = 0, this.yStart = 0, this.xStop = 0, this.yStop = 0, this.radiusStart = 0, this[a(405)] = 0, t != null && o != null && (this.xStart = t, this.yStart = e, this[a(381)] = n, this.xStop = r, this.yStop = i, this[a(405)] = o);
  }
  static _fromJSON(t) {
    let e = new Qa(null, null, null, null, null, null);
    return Object.assign(e, t), e;
  }
  addColorStop(t, e) {
    this.colors == null && (this.colors = []), this.colors.push([t, e]);
  }
  [S(411)](t) {
    this[S(374)] = t, this.update();
  }
  [S(404)]() {
    const t = S;
    if (this.gradient != null && !this.dirty)
      return this.gradient;
    if (this.gradient = ui.createRadialGradient(this[t(358)], this[t(391)], this.radiusStart, this[t(386)], this.yStop, this.radiusEnd), this[t(374)] != null)
      for (let e = 0; e < this[t(374)][t(414)]; e++) {
        let n = this.colors[e];
        this.gradient[t(422)](n[0], n[1]);
      }
    return this[t(417)];
  }
};
te([p("RadialGradient")], Lr.prototype, S(379), 2), te([p(["xStart", S(391), "radiusStart", "xStop", "yStop", "radiusEnd", "colors"])], Lr.prototype, "serializers", 2);
let Wn = Lr;
const Ps = class $a {
  constructor(t, e) {
    const n = S;
    this[n(412)] = !0, t != null && (this.image = t, this[n(397)] = e || "no-repeat");
  }
  update() {
    this.dirty = !0;
  }
  [S(418)]() {
    let t = {}, e = this;
    return this._allwaysSerializers.forEach((n) => {
      t[n] = e[n];
    }), this.serializers.forEach((n) => {
      t[n] = e[n];
    }), t;
  }
  static _fromJSON(t) {
    let e = new $a(null);
    return Object.assign(e, t), e;
  }
  getStyle() {
    const t = S;
    return this[t(387)] == null ? null : this[t(427)] == null || this.dirty ? (this.pattern == null && (this.pattern = ui.createPattern(this.imageObject, this.repetition || t(426))), this.pattern) : this[t(427)];
  }
  get image() {
    return this[S(387)] == null ? null : this.imagePath;
  }
  set image(t) {
    const e = S;
    if (ft.cancelLoadByObject(this), this[e(383)] = t, t != null) {
      let n = this;
      ft[e(371)](this, t, function(r) {
        r != null && (n.imageObject = r);
      });
    }
  }
  setTransform(t) {
    const e = S;
    this[e(427)] != null && this.pattern[e(430)](t);
  }
};
te([p("StylePattern")], Ps.prototype, "className", 2), te([p(["className"])], Ps.prototype, S(376), 2), te([p([S(375), S(397)])], Ps.prototype, "serializers", 2);
let fe = Ps;
(function() {
  for (var s = Tn, t = di(); ; )
    try {
      if (-parseInt(s(430)) / 1 * (-parseInt(s(441)) / 2) + parseInt(s(428)) / 3 + -parseInt(s(431)) / 4 * (parseInt(s(429)) / 5) + parseInt(s(438)) / 6 * (-parseInt(s(434)) / 7) + parseInt(s(422)) / 8 * (-parseInt(s(439)) / 9) + parseInt(s(423)) / 10 + -parseInt(s(421)) / 11 === 805382)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var yt, gs, Ue, Nn, cr, Ct, Je, th = (gs = Tn, (yt = th || {})[yt.NONE = 1] = "NONE", yt[yt.EDIT = 2] = "EDIT", yt[yt.CONNECT = 4] = "CONNECT", yt[yt.ADJUST = 8] = gs(427), yt[yt[gs(435)] = 16] = gs(435), yt[yt.ADJUST_ROTATE = 32] = "ADJUST_ROTATE", yt[yt.CONNECT_EDIT = 6] = "CONNECT_EDIT", yt), Bh = ((Ue = Bh || {})[Ue[Tn(440)] = 1] = "NONE", Ue[Ue.INPUT = 2] = "INPUT", Ue[Ue.OUTPUT = 4] = "OUTPUT", Ue), zh = ((Nn = zh || {})[Nn[(cr = Tn)(424)] = 1] = "ABSOLUTE", Nn[Nn[cr(436)] = 2] = cr(436), Nn), jh = (Je = Tn, (Ct = jh || {})[Ct.NDCAnchor = 0] = Je(425), Ct[Ct[Je(433)] = 1] = Je(433), Ct[Ct.AutoAnchor = 2] = Je(437), Ct[Ct[Je(426)] = 3] = "FixedPointAnchor", Ct[Ct.NodePositionAnchor = 4] = Je(432), Ct[Ct.FunctionAnchor = 5] = "FunctionAnchor", Ct);
function Tn(s, t) {
  var e = di();
  return (Tn = function(n, r) {
    return e[n -= 421];
  })(s, t);
}
function di() {
  var s = ["10WdTiiG", "548iKXhda", "269116FCRDaE", "NodePositionAnchor", "SegmentAnchor", "3211677tOageK", "ADJUST_RESIZE", "RELATIVE", "AutoAnchor", "6mZsdZC", "27WRjfOz", "NONE", "1216RuAzGf", "5108851PFjFhF", "2584112HVuGea", "12599740qDsrrd", "ABSOLUTE", "NDCAnchor", "FixedPointAnchor", "ADJUST", "3717228AnQIDk"];
  return (di = function() {
    return s;
  })();
}
var X = fi;
(function() {
  for (var s = fi, t = gi(); ; )
    try {
      if (parseInt(s(206)) / 1 + parseInt(s(207)) / 2 + -parseInt(s(196)) / 3 + parseInt(s(209)) / 4 + parseInt(s(194)) / 5 + parseInt(s(195)) / 6 + parseInt(s(189)) / 7 * (-parseInt(s(193)) / 8) === 784556)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Wh = Object[X(200)], Fh = Object.getOwnPropertyDescriptor, Tt = (s, t, e, n) => {
  for (var r, i = X, o = n > 1 ? void 0 : n ? Fh(t, e) : t, a = s[i(199)] - 1; a >= 0; a--)
    (r = s[a]) && (o = (n ? r(t, e, o) : r(o)) || o);
  return n && o && Wh(t, e, o), o;
};
function fi(s, t) {
  var e = gi();
  return (fi = function(n, r) {
    return e[n -= 186];
  })(s, t);
}
function gi() {
  var s = ["1317295fGsVcO", "1944690GmySan", "3314220sGfJCo", "NONE", "pointerupHandler", "length", "defineProperty", "FixedPointAnchor", "FunctionAnchor", "className", "prototype", "point", "1385297LJzaTJ", "904328oOPJXf", "name", "2997648nninKY", "INPUT", "concat", "getNormal", "8996057PxDjgt", "_serializers", "_allwaysSerializers", "normalize", "8eWUqUC"];
  return (gi = function() {
    return s;
  })();
}
var Ye, Oa, Rh = ((Ye = Rh || {})[Ye[(Oa = X)(197)] = 1] = "NONE", Ye[Ye.INPUT = 2] = Oa(186), Ye[Ye.OUTPUT = 4] = "OUTPUT", Ye);
class bt {
  constructor(t, e) {
    this.name = t, e != null && (this.usage = e);
  }
  toJSON() {
    var t = X;
    return Vs(this, this._serializers, this[t(191)]);
  }
  takePoint() {
    var t = X;
    let e = this.point;
    return this[t(205)] = null, e;
  }
  remember(t) {
    this.point = t;
  }
  pointermoveHandler(t, e, n) {
  }
  [X(198)](t, e, n) {
  }
  pointerdownHandler(t, e, n) {
  }
}
Tt([p(null)], bt.prototype, X(203), 2), Tt([p([X(203)])], bt[X(204)], "_allwaysSerializers", 2), Tt([p(Y[X(197)])], bt.prototype, "usage", 2), Tt([p(["name", "usage", "point"])], bt.prototype, "_serializers", 2);
class Me extends bt {
  constructor(t, e, n, r) {
    super(t, r), this.x = 0, this.y = 0, this.x = e, this.y = n;
  }
  [X(188)]() {
    var t = X;
    return this._normal == null && (this._normal = B[t(192)]([0, 0], [this.x, this.y])), this._normal;
  }
}
Tt([p("NDCAnchor")], Me.prototype, X(203), 2), Tt([p(bt[X(204)][X(190)].concat(["x", "y"]))], Me[X(204)], "_serializers", 2);
class mt extends bt {
  constructor(t, e) {
    super(t, e);
  }
  getNormal() {
    return Xr[this[X(208)]];
  }
}
Tt([p("NodePositionAnchor")], mt.prototype, "className", 2);
class Jt extends bt {
  constructor(t, e, n = 0, r) {
    super(t, r), this.t = e, this.segIndex = n;
  }
}
Tt([p("SegmentAnchor")], Jt.prototype, X(203), 2), Tt([p("segment")], Jt.prototype, X(208), 2), Tt([p(bt.prototype._serializers.concat(["t", "segIndex"]))], Jt[X(204)], "_serializers", 2);
class wt extends bt {
  constructor(t, e) {
    super(t, e);
  }
}
Tt([p(X(202))], wt.prototype, "className", 2);
class Kn extends bt {
  constructor(t, e) {
    super(t, e);
  }
}
Tt([p("AutoAnchor")], Kn.prototype, "className", 2);
class dt extends bt {
  constructor(t, e) {
    super(null), this.x = t, this.y = e;
  }
}
Tt([p(X(201))], dt.prototype, "className", 2), Tt([p(bt.prototype._serializers[X(187)](["x", "y"]))], dt.prototype, X(190), 2);
const Oe = Te;
function yi() {
  const s = ["2008uOdPWS", "_defaultInstanceCache", "function already reg, name:", "288672ZvMLec", "has", "getObjectClassName", "10DHFasU", "20642952FoxxrD", "shape already reg, name:", "3415482hqKcXM", "_classes", "class not exist:", "4767EOcAiX", "155PkTYZa", "_sysRegClass", "92aMMyoH", "3048702zaYQLv", "class not exist name:", "623472NMcTCi", "192957tvipcC", "entries", "set"];
  return (yi = function() {
    return s;
  })();
}
(function() {
  const s = Te, t = yi();
  for (; ; )
    try {
      if (parseInt(s(400)) / 1 + parseInt(s(398)) / 2 + parseInt(s(401)) / 3 * (-parseInt(s(397)) / 4) + -parseInt(s(395)) / 5 * (parseInt(s(407)) / 6) + -parseInt(s(394)) / 7 * (-parseInt(s(404)) / 8) + parseInt(s(413)) / 9 * (-parseInt(s(410)) / 10) + parseInt(s(411)) / 11 === 845079)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const pn = class G {
  static regShape(t, e, n) {
    const r = Te;
    let i = t + "." + e;
    if (G._shapeMap[r(408)](i))
      throw new Error(r(412) + i);
    G._shapeMap.set(i, n);
  }
  static getShape(t) {
    let e = G._shapeMap.get(t);
    if (e == null)
      throw new Error("shape is not exist: " + t);
    return e;
  }
  static hasShapeInstance(t) {
    return G._shapeMap.has(t);
  }
  static getShapes(t) {
    const e = Te;
    let n = [];
    for (let [r, i] of G._shapeMap[e(402)]())
      r.startsWith(t) && n.push(i);
    return n;
  }
  static regFunction(t, e, n) {
    const r = Te;
    let i = t + "." + e;
    if (G._functionMap.has(i))
      throw new Error("function already reg, name:" + i);
    G._functionMap[r(403)](i, n);
  }
  static getFunction(t) {
    return G._functionMap.get(t);
  }
  static regClass(t, e, n) {
    const r = Te;
    let i = t + "." + e;
    if (G._classes[r(408)](i))
      throw new Error("class already reg, name:" + i);
    G._classes[r(403)](i, n), G._classNameMap.set(n, i);
  }
  static getClass(t) {
    let e = G[Te(414)].get(t);
    if (e == null)
      throw new Error("class not exist name:" + t);
    return e;
  }
  static [Oe(409)](t) {
    const e = Oe;
    let n = G._classNameMap.get(t.constructor);
    if (n == null)
      throw new Error(e(399) + t.constructor);
    return n;
  }
  static newInstance(t) {
    const e = Oe;
    let n = G._classes.get(t);
    if (n == null)
      throw new Error(e(393) + t);
    return new n();
  }
  static getEmptyInstance(t) {
    let e = G[Oe(405)].get(t);
    return e == null && (e = G.newInstance(t), G._defaultInstanceCache.set(t, e)), e;
  }
  static [Oe(396)](t) {
    const e = Oe;
    let n = t.prototype.className;
    if (G._classes[e(408)](n))
      throw new Error("class already reg, name:" + n);
    G[e(414)][e(403)](n, t), G._classNameMap.set(t, n);
  }
  static _sysRegFunction(t, e) {
    const n = Oe;
    if (G._functionMap[n(408)](t))
      throw new Error(n(406) + t);
    G._functionMap.set(t, e);
  }
};
function Te(s, t) {
  const e = yi();
  return (Te = function(n, r) {
    return e[n -= 393];
  })(s, t);
}
pn._classes = /* @__PURE__ */ new Map(), pn._classNameMap = /* @__PURE__ */ new Map(), pn._functionMap = /* @__PURE__ */ new Map(), pn._shapeMap = /* @__PURE__ */ new Map(), pn[Oe(405)] = /* @__PURE__ */ new Map();
let M = pn;
const de = Xs;
function Xs(s, t) {
  const e = mi();
  return (Xs = function(n, r) {
    return e[n -= 274];
  })(s, t);
}
function mi() {
  const s = ["length", "7GxvvCI", "width", "3kKHLbN", "MAX_SAFE_INTEGER", "1451384mVBooe", "99842swWsvg", "slice", "3792OsxXSC", "height", "pointsToNormalVecs", "1455SRZDnK", "1011364TZqvlV", "50523Gulzfs", "push", "getLineIntersectPoint", "4766330gepOGG", "18DfHhtd", "MIN_SAFE_INTEGER", "setTo", "isPointInPolygon", "forEach", "8248LuddqX", "3023622DZiKhA", "getBoundingBox"];
  return (mi = function() {
    return s;
  })();
}
(function() {
  const s = Xs, t = mi();
  for (; ; )
    try {
      if (parseInt(s(288)) / 1 + parseInt(s(294)) / 2 * (-parseInt(s(285)) / 3) + parseInt(s(279)) / 4 * (parseInt(s(293)) / 5) + -parseInt(s(280)) / 6 * (parseInt(s(283)) / 7) + -parseInt(s(287)) / 8 * (parseInt(s(274)) / 9) + -parseInt(s(298)) / 10 + parseInt(s(295)) / 11 * (parseInt(s(290)) / 12) === 302174)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ht {
  static normalizePoints(t) {
    const e = Xs;
    let n = ht[e(281)](t);
    n.width == 0 && (n.width = 1), n.height == 0 && (n.height = 1);
    let r = n.x + 0.5 * n.width, i = n.y + 0.5 * n.height, o = 0.5 * n[e(284)], a = 0.5 * n.height;
    return t.map((h) => ({ x: (h.x - r) / o, y: (h.y - i) / a }));
  }
  static [de(292)](t, e, n = !1) {
    for (let r = 0; r < e.length - 1; r++) {
      let i = e[r], o = e[r + 1], a = [o.x - i.x, o.y - i.y], h = [-a[1], a[0]];
      t[r] = h;
    }
    if (n) {
      let r = e[e.length - 1], i = e[0], o = [i.x - r.x, i.y - r.y], a = [-o[1], o[0]];
      t[e.length - 1] = a;
    }
  }
  static rotatePoints(t, e, n = 0, r = 0) {
    const i = de;
    if (e == 0 || e % (2 * Math.PI) == 0)
      return t[i(289)]();
    let o = t.map((a) => C.rotate(a.x, a.y, n, r, e));
    return ht.normalizePoints(o);
  }
  static normalizeRects(t, e) {
    const n = de;
    let r = new O();
    r[n(276)](t[0].x, t[0].y, t[0].width, t[0].height);
    for (let l = 1; l < t.length; l++)
      O.union(r, t[l]);
    let i = r.width, o = r.height, a = r.x, h = r.y;
    return t.map((l) => {
      const c = n;
      let u = l.width / i, d = l[c(291)] / o, f = (l.x - a) / i, y = (l.y - h) / o, I = u * e[c(284)], x = d * e.height, m = e.x + f * e[c(284)], b = e.y + y * e[c(291)];
      return new O(m, b, I, x);
    });
  }
  static [de(281)](t) {
    const e = de;
    let n = Number[e(286)], r = Number.MAX_SAFE_INTEGER, i = Number[e(275)], o = Number.MIN_SAFE_INTEGER;
    return t[e(278)](function(a) {
      a.x < n && (n = a.x), a.y < r && (r = a.y), a.x > i && (i = a.x), a.y > o && (o = a.y);
    }), new O(n, r, i - n, o - r);
  }
  static [de(277)](t, e) {
    const n = de;
    let r = t.x, i = t.y, o = !1;
    for (let a = 0, h = e[n(282)] - 1; a < e[n(282)]; h = a++) {
      let l = e[a].x, c = e[a].y, u = e[h].x, d = e[h].y;
      c > i != d > i && r < (u - l) * (i - c) / (d - c) + l && (i !== c || i > d) && (o = !o);
    }
    return o;
  }
  static [de(297)](t, e, n, r) {
    let i = t.x, o = t.y, a = e.x, h = e.y, l = n.x, c = n.y, u = r.x, d = r.y, f = (i - a) * (c - d) - (o - h) * (l - u);
    const y = 1e-6;
    if (Math.abs(f) < y)
      return null;
    let I = ((u - l) * (o - c) - (d - c) * (i - l)) / f, x = ((a - i) * (o - c) - (h - o) * (i - l)) / f;
    return I >= -1e-6 && I <= 1.000001 && x >= -1e-6 && x <= 1.000001 ? { x: i + I * (a - i), y: o + I * (h - o) } : null;
  }
  static getLineIntersectPoints(t, e, n, r) {
    const i = de;
    let o = [];
    for (let a = 0; a < n[i(282)] - 1; a++) {
      let h = ht.getLineIntersectPoint(t, e, n[a], n[a + 1]);
      h && o.push(h);
    }
    if (r) {
      let a = ht.getLineIntersectPoint(t, e, n[n[i(282)] - 1], n[0]);
      a && o[i(296)](a);
    }
    return o;
  }
  static getFirstIntersectPoint(t, e, n, r) {
    for (let i = 0; i < n.length - 1; i++) {
      let o = ht.getLineIntersectPoint(t, e, n[i], n[i + 1]);
      if (o)
        return o;
    }
    if (r) {
      let i = ht.getLineIntersectPoint(t, e, n[n.length - 1], n[0]);
      if (i)
        return i;
    }
    return null;
  }
}
function Ii(s, t) {
  const e = xi();
  return (Ii = function(n, r) {
    return e[n -= 152];
  })(s, t);
}
function xi() {
  const s = ["37625xalkxt", "2554559IsgBPM", "push", "9TKoDKu", "1236117VHycVm", "cos", "vertexCount", "5rdhydF", "1622020WSjMSR", "beginAngle", "3561880KAVWka", "48KnpLJK", "2028704cYMRQs", "10214smhFQn"];
  return (xi = function() {
    return s;
  })();
}
(function() {
  const s = Ii, t = xi();
  for (; ; )
    try {
      if (parseInt(s(163)) / 1 * (parseInt(s(155)) / 2) + parseInt(s(160)) / 3 + -parseInt(s(164)) / 4 + parseInt(s(156)) / 5 * (-parseInt(s(153)) / 6) + parseInt(s(157)) / 7 + parseInt(s(154)) / 8 * (parseInt(s(159)) / 9) + -parseInt(s(152)) / 10 === 234206)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class $e {
  static grid(t, e) {
    t = Math.max(t, 1);
    let n = [], r = 1 / ((e = Math.max(e, 1)) - 1), i = 1 / (t - 1);
    r == 1 / 0 && (r = 0), i == 1 / 0 && (i = 0);
    for (let o = 0; o < t; o++)
      for (let a = 0; a < e; a++) {
        let h = { y: o * i, x: a * r };
        n.push(h);
      }
    return n;
  }
  static innerGrid(t, e) {
    let n = [], r = 1 / (e + 1), i = 1 / (t + 1), o = r, a = i;
    for (let h = 0; h < t; h++)
      for (let l = 0; l < e; l++) {
        let c = { x: o + l * r, y: a + h * i };
        n.push(c);
      }
    return n;
  }
  static circle(t) {
    const e = Ii;
    t[e(165)] = t[e(165)] || 0, t.endAngle = t.endAngle || 2 * Math.PI, (t[e(162)] == null || t[e(162)] < 3) && (t.vertexCount = 3);
    let n = [], r = (t.endAngle - t.beginAngle) / t.vertexCount;
    for (let i = 0; i < t.vertexCount; i++) {
      let o = t.beginAngle + i * r;
      n[e(158)]({ x: Math[e(161)](o), y: Math.sin(o) });
    }
    return n;
  }
  static polygon(t) {
    return $e.circle({ vertexCount: Math.max(3, t) });
  }
}
function bi(s, t) {
  var e = wi();
  return (bi = function(n, r) {
    return e[n -= 113];
  })(s, t);
}
function wi() {
  var s = ["97070PTuMtp", "length", "865Evnjvo", "5414589BMmTpi", "24028dDmdgV", "1041234aUsHSs", "2519TrUaSD", "55482xJAKBo", "5109448wtZDtH", "141054lBdUnM", "8cYUvFg", "266lrOabr"];
  return (wi = function() {
    return s;
  })();
}
(function() {
  for (var s = bi, t = wi(); ; )
    try {
      if (parseInt(s(124)) / 1 + parseInt(s(117)) / 2 * (-parseInt(s(116)) / 3) + parseInt(s(123)) / 4 * (parseInt(s(121)) / 5) + parseInt(s(114)) / 6 * (-parseInt(s(118)) / 7) + parseInt(s(115)) / 8 + parseInt(s(122)) / 9 + parseInt(s(119)) / 10 * (-parseInt(s(113)) / 11) === 558386)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class an {
  constructor(t = 0, e = 0) {
    this[bi(120)] = 0, this.x = t, this.y = e;
  }
}
function dn(s, t, e, n) {
  return Math[le(307)]((e - s) * (e - s) + (n - t) * (n - t));
}
function vi(s, t, e, n = 100, r = 1e-6) {
  const i = le;
  let o = e;
  for (let a = 0; a < n; a++) {
    const h = t(o);
    if (Math[i(311)](h) < r)
      break;
    const l = o - s(o) / h;
    if (Math.abs(l - o) < r) {
      o = l;
      break;
    }
    o = l;
  }
  return o;
}
function Hh(s, t, e) {
  const n = le;
  if (s.x == 0)
    return s.y > 0 ? s.y = e : s.y = -e, s;
  if (s.y == 0)
    return s.x > 0 ? s.x = t : s.x = -t, s;
  let r = s.y / s.x;
  if (s.x > 0) {
    let i = r * t;
    if (Math[n(311)](i) <= e)
      return s.x = t, s.y = i, s;
  } else {
    let i = r * t;
    if (Math.abs(i) <= e)
      return s.x = -t, s.y = -i, s;
  }
  if (s.y > 0) {
    let i = e / r;
    if (Math.abs(i) <= t)
      return s.x = i, s.y = e, s;
  } else {
    let i = e / r;
    if (Math[n(311)](i) <= t)
      return s.x = -i, s.y = -e, s;
  }
  return { x: 0, y: 0 };
}
function Ta(s, t, e, n) {
  const r = [s - e.x, t - e.y], i = [n.x - e.x, n.y - e.y], o = B.normalize([], i), a = B.len(i);
  let h;
  const l = B.dot(r, o);
  if (l > a)
    h = n;
  else if (l < 0)
    h = e;
  else {
    let u = B.multiplyC([1, 1], o, l);
    h = { x: e.x + u[0], y: e.y + u[1] };
  }
  let c = new an(h.x, h.y);
  return c.segLen = a, c.projectionLen = l, c.t = l / a, c;
}
function ys(s, t, e, n) {
  let r = [s.x - t.x, s.y - t.y], i = [e.x - t.x, e.y - t.y], o = r[0] * i[1] - r[1] * i[0];
  if (Math.abs(o) > n)
    return !1;
  let a = r[0] * i[0] + r[1] * i[1];
  return !(a < 0) && !(a > i[0] * i[0] + i[1] * i[1]);
}
function le(s, t) {
  const e = _i();
  return (le = function(n, r) {
    return e[n -= 294];
  })(s, t);
}
function _i() {
  const s = ["unkwnow object!", "sqrt", "960KVDCwY", "segIndex", "46492MtLYjx", "abs", "distance", "11885860gikDEp", "normalize", "8pwzVNX", "MAX_SAFE_INTEGER", "dot", "95yALgil", "distancePoint", "length", "110376XGtDnD", "6282600retaHI", "begin", "3797913ZXNwRB", "71376840ZZyxFN", "23658MpJNUX"];
  return (_i = function() {
    return s;
  })();
}
(function() {
  const s = le, t = _i();
  for (; ; )
    try {
      if (parseInt(s(310)) / 1 * (-parseInt(s(294)) / 2) + -parseInt(s(303)) / 3 + -parseInt(s(301)) / 4 + parseInt(s(297)) / 5 * (-parseInt(s(305)) / 6) + -parseInt(s(313)) / 7 + -parseInt(s(308)) / 8 * (parseInt(s(300)) / 9) + parseInt(s(304)) / 10 === 870518)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Ht = { clamp: function(s, t, e) {
  return e < s ? s : e > t ? t : e;
}, isHorizontal: function(s) {
  return Math[le(311)](Math.abs(s) % Math.PI) < 0.5;
}, getNearestPositionName: function(s, t) {
  const e = le;
  let n = s.segIndex, r = s.t, i = s.object, o = r >= 0.25 && r <= 0.75, a = r - 0.5, h = Math.abs(s.segLen * a);
  if (i.isNode) {
    if (h > t || !o)
      return null;
    if (n == 0)
      return $t.ct;
    if (n == 1)
      return $t.rm;
    if (n == 2)
      return $t.cb;
    if (n == 3)
      return $t.lm;
    throw new Error("error segIndex:" + n);
  }
  if (i.isLink) {
    let l = i.worldToLocalXY(s.x, s.y);
    return C[e(298)](l, i.getBeginPoint()) <= t ? K[e(302)] : C.distancePoint(l, i.getEndPoint()) <= t ? K.end : null;
  }
  throw new Error(e(306));
}, getNearestPointOnLines: function(s, t, e, n = !1) {
  const r = le;
  if (e.length < 2)
    throw new Error("number of points is less than 2");
  let i = new an(e[0].x, e[0].y), o = Number[r(295)];
  for (let a = 0; a < e.length - 1; a++) {
    const h = e[a], l = e[a + 1], c = Ta(s, t, h, l), u = C.distance(c.x, c.y, s, t);
    u < o && (i = c, i.seg = [h, l], i.dist = u, i.segIndex = a, o = u);
  }
  if (n) {
    const a = e[e.length - 1], h = e[0], l = Ta(s, t, a, h), c = C[r(312)](l.x, l.y, s, t);
    c < o && (i = l, i.seg = [a, h], i.dist = c, i[r(309)] = e.length - 1, o = c);
  }
  return i;
}, getLineIntersectPoint: function(s, t, e, n, r = !1) {
  const i = le, o = [t.x - s.x, t.y - s.y], a = [n.x - e.x, n.y - e.y], h = B.normalize([], [-o[1], o[0]]), l = B[i(314)]([], [-a[1], a[0]]), c = h[0], u = h[1], d = l[0], f = l[1], y = c * f - d * u;
  if (y == 0)
    return null;
  const I = B[i(296)](h, [s.x, s.y]), x = B.dot(l, [e.x, e.y]), m = { x: (f * I - u * x) / y, y: (c * x - d * I) / y };
  if (r == 0) {
    let b = 0;
    if (!ys(m, s, t, b) || !ys(m, e, n, b))
      return null;
  }
  return m;
}, isPointOnLineSegs: function(s, t, e, n) {
  const r = le;
  for (let i = 0; i < t.length - 1; i++)
    if (ys(s, t[i], t[i + 1], n))
      return !0;
  return !!(e && ys(s, t[t[r(299)] - 1], t[0], n));
} }, F = os;
function Si() {
  const s = ["anchors", "3968352NACTgo", "getConnectAutoPoint", "3874380ciwpdk", "width", "setConnections", "55PLrNGO", "vertices", "values", "9502576jXEfhK", "_serializers", "_computedStyle", "isUnit", "circle", "isClosed", "7821730FiXzar", "scale", "478406jiEDxw", "updatePoints", "set", "14IfrOPM", "getFirstIntersectPoint", "prototype", "50850YBzsyT", "length", "polygon", "5yLbjbg", "fromJSON", "9SqScNo", "_obb", "localPoints", "6918420qfMKKd", "toJSON", "dirty", "className", "getAnchors", "beginPath", "15gDvtzi", "_allwaysSerializers"];
  return (Si = function() {
    return s;
  })();
}
(function() {
  const s = os, t = Si();
  for (; ; )
    try {
      if (-parseInt(s(332)) / 1 + parseInt(s(326)) / 2 * (-parseInt(s(346)) / 3) + -parseInt(s(349)) / 4 * (-parseInt(s(335)) / 5) + parseInt(s(351)) / 6 * (-parseInt(s(329)) / 7) + -parseInt(s(357)) / 8 + parseInt(s(337)) / 9 * (parseInt(s(324)) / 10) + -parseInt(s(354)) / 11 * (-parseInt(s(340)) / 12) === 930789)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Uh = Object.defineProperty, Jh = Object.getOwnPropertyDescriptor, Kt = (s, t, e, n) => {
  const r = os;
  for (var i, o = n > 1 ? void 0 : n ? Jh(t, e) : t, a = s[r(333)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && Uh(t, e, o), o;
};
function os(s, t) {
  const e = Si();
  return (os = function(n, r) {
    return e[n -= 319];
  })(s, t);
}
const ge = class eh {
  constructor() {
    const t = os;
    this.isClosed = !0, this[t(355)] = [], this[t(348)] = eh.DefaultAnchors;
  }
  [F(344)]() {
    return this.anchors;
  }
  hasAnchor(t) {
    return this.anchors.has(t);
  }
  [F(353)](t) {
    const e = F;
    this.anchors = /* @__PURE__ */ new Map();
    for (let n = 0; n < t[e(333)]; n++) {
      const r = t[n];
      let i = new Me(r.name, r.x, r.y);
      i.usage = r.usage || th.CONNECT_EDIT, this.anchors[e(328)](r.name, i);
    }
  }
  getConnectionAnchor(t) {
    return this[F(348)].get(t);
  }
  getConnectionAnchors() {
    const t = F;
    return this.anchors[t(356)]();
  }
  getIntersect(t, e, n) {
    const r = n._obb.points;
    return Ht.getNearestPointOnLines(t, e, r, this.isClosed);
  }
  [F(350)](t, e, n) {
    const r = F;
    let i = { x: t, y: e }, o = { x: n._obb.aabb.center, y: n[r(338)].aabb.middle };
    return ht[r(330)](o, i, n._obb.points, this.isClosed) || o;
  }
  [F(341)]() {
    const t = F;
    let e = Vs(this, this[t(319)], this._allwaysSerializers);
    return e[t(343)] = M.getObjectClassName(this), e;
  }
  static [F(336)](t) {
    let e = t.namespace || t.className;
    if (M.hasShapeInstance(e)) {
      let r = M.getShape(e);
      return Object.assign(r, t), r;
    }
    let n = M.newInstance(t.className);
    return Object.assign(n, t), n;
  }
  static grid(t, e) {
    return $e.grid(t, e);
  }
  static innerGrid(t, e) {
    return $e.innerGrid(t, e);
  }
  static circle(t) {
    return $e[F(322)](t);
  }
  static [F(334)](t) {
    return $e[F(334)](t);
  }
};
ge.DefaultAnchors = /* @__PURE__ */ new Map(), Kt([p("Shape")], ge.prototype, "className", 2), Kt([p(!0)], ge.prototype, "isClosed", 2), Kt([p(32)], ge.prototype, "width", 2), Kt([p(32)], ge.prototype, "height", 2), Kt([p(!0)], ge.prototype, F(321), 2), Kt([p(["className"])], ge.prototype, F(347), 2), Kt([p(["vertices", "isClosed", F(352), "height", F(355), "namespace"])], ge.prototype, F(319), 2);
let hn = ge;
class nh extends hn {
  draw(t, e) {
    console.warn("not implement draw");
  }
}
Kt([p("RegShape")], nh.prototype, "className", 2);
class ee extends hn {
  constructor(t) {
    const e = F;
    super(), this.isClosed = !0, this[e(327)](t);
  }
  updatePoints(t) {
    const e = F;
    this.vertices = t, this[e(342)] = !0;
  }
  draw(t, e) {
    const n = F, r = e[n(338)][n(339)];
    if (r == null || r.length == 0)
      return;
    let i = r[0];
    t[n(345)](), t.moveTo(i.x, i.y);
    for (let o = 1; o < r[n(333)]; o++)
      (r[o].x !== i.x || r[o].y !== i.y) && t.lineTo(r[o].x, r[o].y), i = r[o];
    this.isClosed && (t.fill(), t.closePath()), e[n(320)].lineWidth > 0 && t.stroke();
  }
  rotate(t) {
    const e = F;
    return this.vertices = ht.rotatePoints(this[e(355)], t), this.dirty = !0, this;
  }
  [F(325)](t, e) {
    const n = F;
    return this.vertices.forEach((r) => {
      r.x *= t, r.y *= e;
    }), this[n(355)] = ht.normalizePoints(this.vertices), this[n(342)] = !0, this;
  }
  skew(t, e) {
    const n = F;
    return this[n(355)].forEach((r) => {
      let i = r.x, o = r.y;
      r.x = i + o * e, r.y = o + i * t;
    }), this[n(355)] = ht.normalizePoints(this.vertices), this.dirty = !0, this;
  }
}
function Pi() {
  const s = ["hasOwnProperty", "84IJeETm", "newInstance", "filter", "styles", "addChild", "12rwgUPL", "3239570pQMHLT", "fromJSON", "fromEditInfo", "2714780LChsgm", "isLink", "8gCqCIW", "length", "keys", "path", "143898zqufzP", "8151AaiLZz", "forEach", "set", "map", "34800eDBNkI", "CustomStyle", "676HgvJfy", "className", "DisplayObjects", "error", "get", "1467891aLLotr", "2670140lhcfQf"];
  return (Pi = function() {
    return s;
  })();
}
function ki(s, t) {
  const e = Pi();
  return (ki = function(n, r) {
    return e[n -= 113];
  })(s, t);
}
function ks(s, t, e) {
  const n = ki;
  let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), a = t.Roots, h = t[n(117)] || [], l = t.Styles || [], c = t.Shapes || [], u = t.Resources || [], d = t.CustomStyle || {};
  if (t.SerializeType, h.forEach((m) => {
    const b = n;
    if (m[b(122)]("userData") && !m[b(122)]("data")) {
      let _ = m.userData;
      delete m.userData, m.data = _;
    }
    m[b(133)] && m.path == null && (m[b(137)] = [m.begin, m.end], delete m.begin, delete m.end);
  }), d[n(126)] == null) {
    let m = {}, b = Object[n(136)](d);
    for (let _ = 0; _ < b[n(135)]; _++) {
      let k = b[_];
      k.startsWith(".") && (m[k] = d[k], delete d[k]);
    }
    d.styles = m;
  }
  l.forEach(function(m, b) {
    const _ = n;
    i.set(b, Ut[_(130)](m, u));
  }), c.forEach(function(m, b) {
    const _ = n;
    let k = hn[_(130)](m);
    k != null ? (Object.assign(k, m), o[_(141)](b, k)) : console[_(118)]("shape not exist:", m);
  });
  let f = [];
  const y = h[n(142)](function(m, b) {
    const _ = n;
    let k;
    e != null && (k = e[_(119)](m)), k == null && (k = M[_(124)](m[_(116)])), b < a[_(135)] && f.push(k);
    let v = { resourcesArr: u, objJson: m, styleIndexMap: i, shapeIndexMap: o };
    return k._fromJSON(v), r.set(b, k), k;
  });
  y[n(140)]((m) => {
    m.removeAllChildren();
  }), h[n(140)]((m, b) => {
    const _ = n;
    let k = m.parent;
    if (k == null)
      return;
    let v = r.get(k), A = y[b];
    A.parent != null && A.removeFromParent(), v[_(127)](A);
  });
  let I = h[n(125)]((m) => m.isLink), x = y.filter((m) => m.isLink);
  return I.forEach(function(m, b) {
    x[b]._afterJson(m, r);
  }), t.EditInfo != null && s.editor != null && s.editor[n(131)](t.EditInfo, y), t[n(114)] != null && s.styleSystem.fromJson(t), f;
}
Kt([p("PolygonShape")], ee[F(331)], "className", 2), Kt([p(!0)], ee.prototype, F(323), 2), Kt([p(!1)], ee.prototype, F(342), 2), function() {
  const s = ki, t = Pi();
  for (; ; )
    try {
      if (parseInt(s(113)) / 1 * (-parseInt(s(128)) / 2) + -parseInt(s(139)) / 3 * (parseInt(s(115)) / 4) + parseInt(s(132)) / 5 + parseInt(s(138)) / 6 * (-parseInt(s(123)) / 7) + parseInt(s(134)) / 8 * (parseInt(s(120)) / 9) + parseInt(s(129)) / 10 + parseInt(s(121)) / 11 === 316983)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
const Mn = Gs;
function Li() {
  const s = ["whenAllImagesLoaded", "340823guJJKp", "type", "3381500ObtiGf", "_serializers", "stage", "Resources", "96eoUzJm", "12314lBkgxi", "148852tFouwb", "3047MMTdGZ", "9BEbmSx", "1918168JQYwPP", "39GVSgAa", "length", "jsonToObjects", "87BXtIzK", "33576CJzncb", "17591710yTUAvz"];
  return (Li = function() {
    return s;
  })();
}
function Gs(s, t) {
  const e = Li();
  return (Gs = function(n, r) {
    return e[n -= 226];
  })(s, t);
}
(function() {
  const s = Gs, t = Li();
  for (; ; )
    try {
      if (-parseInt(s(234)) / 1 * (-parseInt(s(226)) / 2) + -parseInt(s(231)) / 3 * (parseInt(s(227)) / 4) + -parseInt(s(240)) / 5 + parseInt(s(244)) / 6 * (parseInt(s(238)) / 7) + -parseInt(s(230)) / 8 + -parseInt(s(229)) / 9 * (-parseInt(s(236)) / 10) + parseInt(s(228)) / 11 * (-parseInt(s(235)) / 12) === 898968)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const sh = class rh {
  constructor(t) {
    this[Gs(242)] = t;
  }
  setNumberFixed(t) {
    rh.numberFixed = t;
  }
  objectsToJSON(t, e = "Objects") {
    return Bs(this.stage, t, null, e);
  }
  [Mn(233)](t, e) {
    return ks(this[Mn(242)], t, e);
  }
  static getProtoDefaultProperties(t) {
    let e = t[Mn(241)], n = Object.getPrototypeOf(t), r = {};
    for (let i = 0; i < e.length; i++) {
      let o = e[i], a = n[o], h = t[o];
      h === a && (r[o] = h);
    }
    return r;
  }
  componentToObjects(t) {
    let e = JSON.parse(t);
    return ks(this.stage, e);
  }
  objectsToComponent(t) {
    let e = this.objectsToJSON(t);
    return JSON.stringify(e);
  }
  fillByJson(t, e) {
    const n = Mn;
    let r = this, i = (t[n(243)] || []).filter((o) => o[n(239)] == "img").map((o) => o.src);
    return new Promise((o, a) => {
      const h = n;
      if (i[h(232)] == 0)
        return r._restoreFromState(t, e), void o(!0);
      ft[h(237)](i).then(() => {
        r._restoreFromState(t, e), o(!0);
      }).catch((l) => {
        a(l);
      });
    });
  }
  _getState(t, e) {
    return Bs(this.stage, [t], e, "Layer");
  }
  _restoreFromState(t, e) {
    return ks(this[Mn(242)], t, e);
  }
};
sh.numberFixed = 6;
let Ms = sh;
function Oi() {
  const s = ["toString", "8clIHmx", "concat", "serializeable", "toFixed", "13YRhdkh", "numberFixed", "5057685BAFdnw", "editor", "3018774aZEIxL", "img", "10pfsKRW", "flatten", "indexImage", "length", "68klcqWB", "20193516xYJaXw", "133863USYTES", "set", "CustomStyle", "resources", "stringify", "499004LICPJM", "createImageIndex error", "1CsQwFe", "Shapes", "912626BZYKsS", "isArray", "toJSON", "filter", "5PTMzll", "890309bSNqso", "getAttribute", "push"];
  return (Oi = function() {
    return s;
  })();
}
function Bs(s, t, e, n) {
  const r = Pn;
  t = t[r(293)]((h) => h[r(301)]);
  const i = {};
  i.version = Rs;
  const o = function(h) {
    const l = Pn;
    let c = [];
    h.length > 0 && (c = ct.flatten(h[0].children));
    for (let b = 1; b < h.length; b++) {
      let _ = ct[l(310)](h[b].children, (k) => k[l(301)]);
      c = c.concat(_);
    }
    let u = h[l(300)](c), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), x = [], m = { objects: u, objIndexMap: d, styleIndexMap: f, styles: [], resourcesIndexMap: I, resources: x, shapeIndexMap: y, shapes: [], indexImage: function(b) {
      const _ = l;
      let k = I.get(b);
      if (k != null)
        return k;
      if (b instanceof HTMLImageElement) {
        let v = { type: _(308), src: b[_(296)]("src") };
        return x.push(v), k = x.length - 1, I.set(b, k), k;
      }
      throw new Error(_(321));
    } };
    return u.forEach((b, _) => {
      b._beforeToJSON(m), d.set(b, _);
    }), m;
  }(t);
  let a = o.objects;
  if (i.Roots = t.map((h, l) => l), i.Styles = o.styles, i[r(289)] = o.shapes, i.Resources = o[r(318)], i.DisplayObjects = a.map(function(h) {
    const l = r;
    let c = h._toJSON(o);
    return e != null && e[l(316)](c, h), c;
  }), t.length > 0 && s.editor != null) {
    let h = s[r(306)].getEditInfo(a, o.objIndexMap);
    h != null && (i.EditInfo = h);
  }
  return n == "Stage" && (i[r(317)] = s.styleSystem.customStyleToJSON(o[r(311)])), i.SerializeType = n, i;
}
function Vs(s, t, e) {
  const n = Pn;
  let r = M.getObjectClassName(s), i = M.getEmptyInstance(r), o = {};
  if (e)
    for (let a = 0; a < e[n(312)]; a++) {
      let h = e[a];
      if (h == "className") {
        o[h] = r;
        continue;
      }
      let l = s[h];
      o[h] = l;
    }
  for (let a = 0; a < t.length; a++) {
    let h = t[a], l = s[h];
    if (l != i[h]) {
      if (Array[n(291)](l) && Array[n(291)](i[h])) {
        if (Xh(i[h], l))
          continue;
        o[h] = l;
      }
      l != null && (typeof l == "number" && Ms.numberFixed != null && (l = Yh(l, Ms[n(304)])), l[n(292)] instanceof Function && (l = l.toJSON())), o[h] = l;
    }
  }
  return o;
}
function Pn(s, t) {
  const e = Oi();
  return (Pn = function(n, r) {
    return e[n -= 288];
  })(s, t);
}
function Yh(s, t) {
  const e = Pn;
  if (Number.isInteger(s))
    return s;
  let n = s[e(298)]();
  return n.length - n.indexOf(".") - 1 > t && (s = s[e(302)](t), s = parseFloat(s)), s;
}
function Xh(s, t) {
  if (s === t)
    return !0;
  if (s.length != t.length)
    return !1;
  for (let e = 0; e < s.length; e++)
    if (s[e] != t[e])
      return !1;
  return !0;
}
(function() {
  const s = Pn, t = Oi();
  for (; ; )
    try {
      if (parseInt(s(288)) / 1 * (parseInt(s(290)) / 2) + -parseInt(s(315)) / 3 * (-parseInt(s(313)) / 4) + parseInt(s(294)) / 5 * (parseInt(s(307)) / 6) + parseInt(s(295)) / 7 * (-parseInt(s(299)) / 8) + parseInt(s(305)) / 9 * (parseInt(s(309)) / 10) + -parseInt(s(320)) / 11 + -parseInt(s(314)) / 12 * (parseInt(s(303)) / 13) === 424620)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const lt = Ai;
(function() {
  const s = Ai, t = Di();
  for (; ; )
    try {
      if (-parseInt(s(206)) / 1 * (-parseInt(s(212)) / 2) + parseInt(s(229)) / 3 * (-parseInt(s(227)) / 4) + parseInt(s(210)) / 5 * (parseInt(s(226)) / 6) + -parseInt(s(214)) / 7 * (-parseInt(s(235)) / 8) + -parseInt(s(207)) / 9 + -parseInt(s(217)) / 10 * (parseInt(s(223)) / 11) + -parseInt(s(228)) / 12 === 684445)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Gh = Object.defineProperty, Vh = Object[lt(231)], En = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Vh(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Gh(t, e, i), i;
};
class qs extends ee {
  constructor() {
    const t = lt;
    super([{ x: -1, y: -1 }, { x: 1, y: -1 }, { x: 1, y: 1 }, { x: -1, y: 1 }]), this[t(221)] = !0, this[t(218)] = !1;
  }
  [lt(232)](t, e) {
    const n = lt;
    let r = e._drawContentDesc[n(236)], i = e._computedStyle.lineWidth;
    t.beginPath(), t.rect(-r.width / 2, -r[n(237)] / 2, r.width, r[n(237)]), t.fill(), i > 0 && t[n(211)]();
  }
}
En([p("Rect")], qs.prototype, "className", 2);
class Ti extends hn {
  constructor() {
    super();
  }
  [lt(232)](t, e) {
    const n = lt;
    let r = e._drawContentDesc.shapeSize;
    t.beginPath(), t.ellipse(0, 0, r.width / 2, r.height / 2, 0, 0, 2 * Math.PI), t.fill(), e[n(219)].lineWidth > 0 && t.stroke();
  }
  getIntersect(t, e, n) {
    const r = lt, i = 0.5 * n._obb.aabb.width, o = 0.5 * n[r(233)].aabb.height, a = n._obb.aabb.center, h = n[r(233)][r(230)][r(222)];
    let l = t - a, c = e - h, u = Math.atan2(c * i, l * o), d = { x: a + i * Math[r(215)](u), y: h + o * Math.sin(u) }, f = t - d.x, y = e - d.y, I = Math.sqrt(f * f + y * y), x = new an(d.x, d.y);
    return x.t = u / (2 * Math.PI), x[r(225)] = I, x;
  }
  getConnectAutoPoint(t, e, n) {
    const r = lt, i = 0.5 * n._obb.aabb[r(208)], o = 0.5 * n[r(233)].aabb.height, a = n._obb[r(230)][r(205)], h = n._obb.aabb.middle;
    let l = t - a, c = e - h, u = Math.atan2(c * i, l * o);
    return { x: a + i * Math.cos(u), y: h + o * Math.sin(u) };
  }
}
En([p(lt(234))], Ti[lt(213)], "className", 2);
class Ei extends ee {
  constructor() {
    super([{ x: -1, y: -1 }, { x: 1, y: 0 }, { x: -1, y: 1 }]);
  }
}
En([p("Triangle")], Ei.prototype, lt(216), 2);
class Ci extends ee {
  constructor() {
    const t = lt;
    super([{ x: -1, y: -1 }, { x: 1, y: 0 }, { x: -1, y: 1 }, { x: 1, y: 0 }, { x: -1, y: 0 }]), this[t(221)] = !1;
  }
  draw(t, e) {
    const n = lt;
    let r = e._drawContentDesc.shapeSize, i = e[n(219)].lineWidth, o = r[n(208)] / 2, a = r.height / 2;
    t.beginPath(), t[n(220)](-o, -a), t.lineTo(o, 0), t[n(209)](-o, a), t.moveTo(-o - 0.5 * i, 0), t.lineTo(o, 0), i > 0 && t.stroke();
  }
}
function Ai(s, t) {
  const e = Di();
  return (Ai = function(n, r) {
    return e[n -= 205];
  })(s, t);
}
function Di() {
  const s = ["7732932PNAwCe", "72189XQlDPa", "aabb", "getOwnPropertyDescriptor", "draw", "_obb", "Ellipse", "367480maljeV", "shapeSize", "height", "Tip", "center", "248YSbkcN", "7836156vgdiOe", "width", "lineTo", "6661775uRNmIa", "stroke", "3470XJSnUs", "prototype", "77LmDdKM", "cos", "className", "443170uVQqnP", "isUnit", "_computedStyle", "moveTo", "isClosed", "middle", "11xCcHOF", "fill", "dist", "6YAhHKH", "4kalqNR"];
  return (Di = function() {
    return s;
  })();
}
En([p("Arrow")], Ci[lt(213)], "className", 2);
class Ni extends ee {
  constructor() {
    super([{ x: 0, y: -1 }, { x: 1, y: 0 }, { x: 0, y: 1 }, { x: -1, y: 0 }]);
  }
}
En([p("Diamond")], Ni[lt(213)], "className", 2);
class Mi extends qs {
  constructor() {
    super();
  }
  draw(t, e) {
    const n = lt;
    let r = e.arrowsSize, i = 0.5 * -e.width, o = 0.5 * -e.height, a = e.width, h = e.height - r;
    t.beginPath(), t.moveTo(i, o), t.lineTo(i + a, o), t.lineTo(i + a, o + h), t.lineTo(r - 2 + 0, o + h), t.lineTo(0, o + h + r), t.lineTo(0 - (r - 2), o + h), t.lineTo(i, o + h), t.lineTo(i, o), t[n(224)](), e._computedStyle.lineWidth > 0 && t.stroke();
  }
}
En([p(lt(238))], Mi.prototype, "className", 2);
const ur = Zs;
function Zs(s, t) {
  const e = Bi();
  return (Zs = function(n, r) {
    return e[n -= 426];
  })(s, t);
}
function Bi() {
  const s = ["_computedStyle", "restore", "getShape", "44380SsWCGd", "238260JUKGwI", "4467771GfekhN", "fillStyle", "8aKOzCD", "16075420PtecNC", "gray", "_sysRegClass", "setShape", "112PMuVLY", "382624gEfDtQ", "3OnUgwx", "3484134OyLOWS", "5291489cnUpoS", "updateMatrix", "save"];
  return (Bi = function() {
    return s;
  })();
}
(function() {
  const s = Zs, t = Bi();
  for (; ; )
    try {
      if (parseInt(s(436)) / 1 + parseInt(s(426)) / 2 * (parseInt(s(427)) / 3) + -parseInt(s(444)) / 4 * (parseInt(s(435)) / 5) + parseInt(s(428)) / 6 + parseInt(s(429)) / 7 * (parseInt(s(439)) / 8) + parseInt(s(437)) / 9 + -parseInt(s(440)) / 10 === 406537)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ih {
  constructor() {
    const t = Zs;
    M._sysRegClass(qs), M._sysRegClass(Ti), M._sysRegClass(Ei), M[t(442)](Ci), M._sysRegClass(Ni), M._sysRegClass(Mi), M._sysRegClass(ee);
  }
  getShapes(t) {
    return M.getShapes(t);
  }
  [ur(434)](t) {
    return M.hasShapeInstance(t) ? M.getShape(t) : M.getEmptyInstance(t);
  }
  drawToCanvas(t, e, n = { size: 42, strokeStyle: ur(441), fillStyle: "white", padding: 0 }) {
    const r = ur;
    let i = n.size || 42, o = i, a = i, h = e.getContext("2d");
    h[r(431)](), h.strokeStyle = n.strokeStyle || "gray", h.fillStyle = n[r(438)] || "white", h.translate(e.width / 2, e.height / 2);
    let l = M.newInstance("ShapeNode");
    return Object.assign(l, { x: 0, y: 0, width: o, height: a }), l[r(443)](t), Object.assign(l[r(432)], { lineWidth: 1, padding: n.padding || 0 }), l[r(430)](), l._updateShapeSize(), t.draw(h, l), h[r(433)](), e;
  }
}
const as = new ih();
function zi() {
  const s = ["1016372CTEIJl", "3516aFBiwB", "8TVmBvu", "5594517sMCfIM", "499265XymOxx", "91807NiEwYH", "15riOmle", "678792EUYAzu", "1072692LaHshk", "removeAt"];
  return (zi = function() {
    return s;
  })();
}
function ji(s, t) {
  const e = zi();
  return (ji = function(n, r) {
    return e[n -= 117];
  })(s, t);
}
const qh = ji;
(function() {
  const s = ji, t = zi();
  for (; ; )
    try {
      if (parseInt(s(123)) / 1 + parseInt(s(119)) / 2 * (-parseInt(s(124)) / 3) + -parseInt(s(125)) / 4 + -parseInt(s(122)) / 5 + -parseInt(s(126)) / 6 + -parseInt(s(118)) / 7 * (parseInt(s(120)) / 8) + parseInt(s(121)) / 9 === 111101)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class me {
  static [qh(117)](t, e) {
    return t.splice(e, 1);
  }
  static remove(t, e) {
    let n = t.indexOf(e);
    return n == -1 ? -1 : (t.splice(n, 1), n);
  }
}
var kt = Wi;
(function() {
  for (var s = Wi, t = Fi(); ; )
    try {
      if (-parseInt(s(121)) / 1 + -parseInt(s(120)) / 2 * (-parseInt(s(112)) / 3) + -parseInt(s(107)) / 4 + parseInt(s(108)) / 5 * (-parseInt(s(126)) / 6) + parseInt(s(119)) / 7 + -parseInt(s(127)) / 8 + parseInt(s(110)) / 9 * (parseInt(s(124)) / 10) === 302937)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Zh = Object.defineProperty, Kh = Object[kt(122)], pr = (s, t, e, n) => {
  for (var r, i = kt, o = n > 1 ? void 0 : n ? Kh(t, e) : t, a = s[i(109)] - 1; a >= 0; a--)
    (r = s[a]) && (o = (n ? r(t, e, o) : r(o)) || o);
  return n && o && Zh(t, e, o), o;
};
function Wi(s, t) {
  var e = Fi();
  return (Wi = function(n, r) {
    return e[n -= 106];
  })(s, t);
}
class Ls extends ve {
  constructor() {
    var t = kt;
    super(), this._matrixDirty = !0, this[t(116)] = { _needPaint: !0, _isOutOfViewport: !1, _attrDirty: !0 }, this._localTransform = xt[t(113)](), this._worldTransform = xt[t(113)](), this._obb = new ue();
  }
  [kt(117)]() {
    var t = kt;
    let e = this._localTransform;
    return e[t(125)](), this._doTransform(e), e;
  }
  getWorldTransform() {
    return this[kt(123)];
  }
  markDirty() {
    this._matrixDirty = !0;
  }
  get [kt(115)]() {
    return this._visible;
  }
  set [kt(115)](t) {
    this[kt(106)] = t, this._matrixDirty = !0;
  }
  [kt(111)]() {
    var t = kt;
    return !this.visible && (this[t(115)] = !0), this;
  }
  hide() {
    var t = kt;
    return this.visible && (this[t(115)] = !1), this;
  }
  [kt(118)]() {
    return this.visible;
  }
  destroy() {
    this.visible = !1, this.listeners = null, this.destroyed = !0;
  }
}
function Fi() {
  var s = ["7750jfYfwF", "length", "97245hiqFqZ", "show", "33IShnuu", "allocate", "destroyed", "visible", "_state", "_getLocalTransform", "isVisible", "2433417TtFWVY", "72670aFxLUp", "508221WThlJg", "getOwnPropertyDescriptor", "_worldTransform", "750mzpFXj", "identity", "1038tXotZf", "3120256oxRhKL", "_visible", "353404FdKVVb"];
  return (Fi = function() {
    return s;
  })();
}
pr([p(!0)], Ls.prototype, "_visible", 2), pr([p(!1)], Ls.prototype, "painted", 2), pr([p(!1)], Ls.prototype, kt(114), 2);
const g = Ri;
(function() {
  const s = Ri, t = Hi();
  for (; ; )
    try {
      if (-parseInt(s(141)) / 1 + -parseInt(s(169)) / 2 * (parseInt(s(206)) / 3) + parseInt(s(179)) / 4 + -parseInt(s(232)) / 5 + parseInt(s(173)) / 6 * (-parseInt(s(215)) / 7) + -parseInt(s(198)) / 8 * (parseInt(s(150)) / 9) + -parseInt(s(233)) / 10 * (-parseInt(s(199)) / 11) === 336986)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Qh = Object.defineProperty, $h = Object[g(180)], J = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? $h(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Qh(t, e, i), i;
};
function Ri(s, t) {
  const e = Hi();
  return (Ri = function(n, r) {
    return e[n -= 121];
  })(s, t);
}
const R = class Fn extends Ls {
  constructor() {
    const t = g;
    super(), this._x = 0, this._y = 0, this.data = {}, this[t(163)] = {}, this.children = [], this.style = new Ut(), this._computedStyle = new Ut(), this.classList = [], this[t(176)] = [], this.outLinks = [];
  }
  translate(t, e) {
    return this.x = t, this.y = e, this;
  }
  scale(t, e) {
    const n = g;
    return this[n(137)] = t, this[n(172)] = e, this;
  }
  [g(129)](t) {
    return this[g(219)] = t, this;
  }
  [g(197)](t) {
    const e = g;
    return this[e(238)]._attrDirty = !0, Object.assign(this[e(163)], t), this;
  }
  removeAttribute(t) {
    delete this.attributes[t], this._state._attrDirty = !0;
  }
  [g(156)](t, e) {
    this.attributes[t] = e, this._state._attrDirty = !0;
  }
  getAttribute(t, e) {
    let n = this[g(163)][t];
    return n ?? e;
  }
  getAABB(t) {
    const e = g;
    if (this._matrixDirty && this[e(203)](), t != 1)
      return this[e(221)].aabb;
    let n = Fn[e(158)]([this]).map((r) => r._obb[e(130)]);
    return O.unionRects(n);
  }
  [g(193)](t) {
    const e = g;
    if (this.dispatchEvent(tt.EventInstances.dragEvent), this[e(177)] == 0 || this.draggable == 0)
      return;
    let n = this[e(211)].getWorldTransform()[e(240)]().vec([1, 1], [t.dxInWorld, t[e(175)]]);
    this.translateWith(n[0], n[1]);
  }
  getShape() {
    return this._shape;
  }
  getStyle(t) {
    return this[g(207)][t];
  }
  [g(146)](t) {
    return this.setStyles(t);
  }
  setStyles(t) {
    return Object.assign(this.style, t), this.style.dirty = !0, this;
  }
  setStyle(t, e) {
    return this.style[t] = e, this.style.dirty = !0, this;
  }
  getComputedStyle() {
    return this[g(196)];
  }
  clearStyles() {
    const t = g;
    let e = Object.keys(this.style);
    for (let n = 0; n < e[t(226)]; n++) {
      let r = e[n];
      r != "dirty" && delete this[t(207)][r];
    }
    return this[t(207)][t(127)] = !0, this;
  }
  addClass(t) {
    const e = g;
    if (t.charAt(0) !== ".")
      throw new Error(e(183));
    return me.remove(this.classList, t), this.classList[e(213)](t), this.style[e(127)] = !0, this;
  }
  removeClass(t) {
    const e = g;
    me.remove(this.classList, t), this[e(207)].dirty = !0;
  }
  hasClass(t) {
    return this.classList.indexOf(t) != -1;
  }
  removeAllClass() {
    return this.classList.length = 0, this.style.dirty = !0, this;
  }
  isConnected() {
    const t = g;
    return this[t(176)].length > 0 || this[t(237)].length > 0;
  }
  getPoint(t, e) {
    let n = this[g(236)](t, e);
    return n.x += this.x, n.y += this.y, n;
  }
  getLocalPoint(t, e) {
    const n = g;
    let r = this._obb[n(159)];
    if (r == null && (r = this._getOBBPoints()), e != null) {
      let i = this._shape.isClosed ? r.length : r.length - 1;
      if (e > i)
        throw console[n(227)](e, i), new Error("segIndex out of bounds.");
      let o = e + 1;
      o == r[n(226)] && (o = 0);
      let a = r[e], h = r[o];
      if (a == null || h == null)
        throw console.log(a, h, r), console.log(t, e, o), new Error("beginPoint or endPoint is null");
      r = [a, h];
    }
    return C.lerpOnLines(r, t, this._shape.isClosed);
  }
  _findChildren(t, e = !1) {
    const n = g;
    let r = this.children, i = [];
    for (let o = 0; o < r.length; o++) {
      let a = r[o];
      if (t(a) && i[n(213)](a), e) {
        let h = a._findChildren(t, e);
        i = i.concat(h);
      }
    }
    return i;
  }
  [g(202)](t, e = !1) {
    const n = g;
    let r = this.children;
    for (let i = 0; i < r[n(226)]; i++) {
      let o = r[i];
      if (t(o))
        return o;
      if (e)
        return o[n(202)](t, e);
    }
    return null;
  }
  querySelectorAll(t) {
    let e = Ea(t);
    return this._findChildren(e, !0);
  }
  querySelector(t) {
    let e = Ea(t);
    return this._findChild(e, !0);
  }
  [g(241)]() {
    return this[g(176)];
  }
  getOutLinks() {
    return this.outLinks;
  }
  [g(195)](t) {
    this.pointerEnabled == 1 && this.dispatchEvent(tt.EventInstances.pointerdownEvent);
  }
  pointerupHandler(t) {
    const e = g;
    this[e(177)] == 1 && this.dispatchEvent(tt[e(214)].pointerupEvent);
  }
  pointermoveHandler(t) {
    this.pointerEnabled == 1 && this.dispatchEvent(tt.EventInstances.pointermoveEvent);
  }
  [g(131)](t) {
    const e = g;
    this.pointerEnabled == 1 && this.dispatchEvent(tt[e(214)][e(218)]);
  }
  [g(234)](t) {
    const e = g;
    this[e(177)] == 1 && this.dispatchEvent(tt.EventInstances[e(128)]);
  }
  dragEndHandler(t) {
    const e = g;
    this[e(177)] == 1 && this[e(160)](tt.EventInstances[e(223)]);
  }
  [g(239)](t) {
    this.pointerEnabled == 1 && this.dispatchEvent(tt.EventInstances.clickEvent);
  }
  dblclickHandler(t) {
    const e = g;
    this.pointerEnabled == 1 && this[e(160)](tt.EventInstances.dblclickEvent);
  }
  dropHandler(t) {
    this[g(160)](tt.EventInstances.dropEvent);
  }
  dragoverHandler(t) {
    this[g(160)](tt.EventInstances.dropoverEvent);
  }
  dragoutHandler(t) {
    const e = g;
    this.dispatchEvent(tt.EventInstances[e(229)]);
  }
  selectedHandler() {
    const t = g;
    this.pointerEnabled == 1 && (this[t(170)] = !0, this[t(194)] = !0, this[t(160)](tt.EventInstances[t(143)]));
  }
  unselectedHandler() {
    const t = g;
    this._matrixDirty = !0, this.isSelected = !1, this[t(177)] == 1 && this.dispatchEvent(tt.EventInstances.unselectedEvent);
  }
  addChild(t) {
    const e = g;
    this._matrixDirty = !0;
    let n = this;
    if (t[e(211)] != null)
      throw console[e(227)](t), new Error("child already has parent");
    if (n === t)
      throw console[e(227)](n), new Error("can not add self as child");
    return t[e(211)] = n, t.deep = n[e(242)] + 1, n[e(217)] && (t.ownerLayer = n.ownerLayer), t[e(217)] != null && (t.ownerLayer._treeDirty = !0), n.children.push(t), t.hasChildren() && t._updateTree(!0), n.updateZIndex(), this;
  }
  setZIndex(t) {
    const e = g;
    this[e(164)] = t, this.parent && this[e(211)].updateZIndex(), this._matrixDirty = !0;
  }
  updateZIndex() {
    return this[g(185)].sort(function(t, e) {
      return t.zIndex - e.zIndex;
    }), this._matrixDirty = !0, this;
  }
  [g(166)](t = !1) {
    const e = g;
    if (this[e(185)].length <= 0)
      return;
    const n = this.children;
    for (let r = 0; r < n.length; r++) {
      const i = n[r];
      i[e(194)] = !0, i[e(242)] = this.deep + 1, i.ownerLayer = this.ownerLayer, t && i._updateTree(t);
    }
  }
  [g(216)]() {
    return this.children;
  }
  hasChild(t) {
    return this[g(185)].indexOf(t) != -1;
  }
  [g(224)]() {
    return this.children.length > 0;
  }
  removeFromParent() {
    return this.parent && this.parent.removeChild(this), this;
  }
  addChildren(t) {
    const e = g;
    for (let n = 0; n < t.length; n++) {
      let r = t[n];
      r[e(211)] = this, this[e(242)] < tt.MinDeep && (r[e(217)] = this), this.children.push(r);
    }
    return this._matrixDirty = !0, this._updateTree(!0), this[e(126)](), this;
  }
  removeChild(t) {
    const e = g;
    t[e(194)] = !0, this._matrixDirty = !0, t.ownerLayer && (t.ownerLayer._treeDirty = !0), t.ownerLayer = null, t.parent = null;
    let n = this[e(185)].indexOf(t);
    return n != -1 && (me.removeAt(this.children, n), t.hasChildren() && t[e(166)](!0)), this;
  }
  [g(132)](t) {
    const e = g;
    this[e(194)] = !0;
    for (let n = 0; n < t.length; n++) {
      let r = t[n];
      r._matrixDirty = !0, r.ownerLayer && (r.ownerLayer[e(171)] = !0), r[e(217)] = null, r[e(211)] = null;
      let i = this.children.indexOf(r);
      i != -1 && me.removeAt(this.children, i);
    }
    return this[e(166)](!0), this;
  }
  removeAllChildren() {
    const t = g;
    let e = this[t(185)][t(157)]();
    for (let n = 0; n < e.length; n++)
      this[t(209)](e[n]);
    return this;
  }
  hideAllChildren() {
    const t = g;
    return this.children[t(190)](function(e) {
      e.hide();
    }), this;
  }
  showAllChildren() {
    return this.children.forEach(function(t) {
      t.show();
    }), this;
  }
  getChildrenAABB(t) {
    const e = g;
    let n = (t ? Fn.flatten(this[e(185)]) : this.children).map((r) => r._obb.aabb);
    return O.unionRects(n);
  }
  getRoot() {
    let t = this;
    for (; t.parent != null; )
      t = t.parent;
    return t;
  }
  [g(149)](t, e) {
    const n = g;
    return this[n(225)]()[n(240)]().pointXY(t, e);
  }
  localToWorldXY(t, e) {
    return this[g(225)]().pointXY(t, e);
  }
  [g(222)](t) {
    const e = g;
    return this.inLinks == null && (this.inLinks.length = 0), this[e(176)][e(213)](t), this;
  }
  addOutLink(t) {
    return this.outLinks.push(t), this._matrixDirty = !0, t._matrixDirty = !0, this;
  }
  removeInLink(t) {
    const e = g;
    return me.remove(this.inLinks, t), this[e(194)] = !0, t._matrixDirty = !0, this;
  }
  removeOutLink(t) {
    return me[g(212)](this.outLinks, t), this._matrixDirty = !0, t._matrixDirty = !0, this;
  }
  getLinks() {
    const t = g;
    let e = [];
    return this.inLinks && (e = e.concat(this[t(176)])), this.outLinks && (e = e.concat(this[t(237)])), e;
  }
  getOBB() {
    return this._obb;
  }
  [g(203)]() {
    const t = g;
    this._localTransform.identity(), this._doTransform(this[t(153)]), this.parent != null ? xt.multiply(this._worldTransform, this[t(211)]._worldTransform, this[t(153)]) : xt.fillFrom(this._worldTransform, this[t(153)].m), this.isLink && xt.invert(this[t(191)], this._worldTransform);
    let e = this._obb;
    e.localPoints = this._getOBBPoints();
    let n = this[t(186)].points(e[t(124)], e.localPoints);
    if (this[t(121)]) {
      let r = this._getTotalLineWidth();
      ue.toAABB(e.aabb, n, r);
    } else
      ue[t(201)](e[t(130)], n);
    return this._afterUpdateMatrix(), this;
  }
  _afterUpdateMatrix() {
  }
  [g(188)]() {
  }
  _clearMatrixDirtyMark() {
    this._matrixDirty = !1;
  }
  getK(t, e = null) {
    let n = this.getPoint(t - 1e-6, e), r = this.getPoint(t + 1e-6, e), i = r.x - n.x, o = r.y - n.y;
    return Math.atan2(o, i);
  }
  isOutOfParent() {
    const t = g;
    let e = this, n = e.parent;
    if (n != null && n[t(211)] != null) {
      const r = e._obb[t(130)];
      return !n._obb.aabb.isIntersectRect(r);
    }
    return !1;
  }
  contains(t) {
    const e = g;
    if (t === this || this.children.includes(t))
      return !0;
    for (let n = 0; n < this[e(185)].length; n++)
      if (this.children[n].contains(t))
        return !0;
    return !1;
  }
  pickable() {
    return this.pointerEnabled;
  }
  destroy() {
    const t = g;
    super[t(135)](), this.pointerEnabled = !1, this.inLinks.forEach((e) => {
      e.unlinkEnd();
    }), this[t(237)].forEach((e) => {
      e.unlinkBegin();
    }), this.inLinks.length = 0, this.outLinks.length = 0, this.parent && this[t(211)].removeChild(this), this.name = null, this.style = null, this[t(185)].length = 0, this._localTransform.release(), this._worldTransform.release(), this._invertWorldTransform && this._invertWorldTransform.release(), this[t(221)][t(124)].length = 0, this[t(168)] = null, this.data = null, this.attributes.length = 0, this._state = null;
  }
  static flatten(t, e, n) {
    const r = g;
    let i = [];
    if (n) {
      let o = [];
      for (let a = 0; a < t.length; a++) {
        let h = t[a];
        h.parent != null && (e == null || e(h) == 1) && (o.push(h), i.push(h));
      }
      for (let a = 0; a < o.length; a++) {
        let h = o[a];
        if (h[r(211)] != null && h.children && h.children[r(226)] > 0) {
          let l = Fn.flatten(h.children, e, n);
          i = i.concat(l);
        }
      }
      return i;
    }
    for (let o = 0; o < t.length; o++) {
      let a = t[o];
      if (a.parent != null && (e == null || e(a) == 1) && (i[r(213)](a), a[r(185)] && a[r(185)].length > 0)) {
        let h = Fn.flatten(a.children, e);
        i = i.concat(h);
      }
    }
    return i;
  }
  toJSON() {
    return this._toJSON();
  }
  _toJSON(t) {
    const e = g;
    let n = Vs(this, this[e(133)], this._allwaysSerializers);
    if (t != null) {
      let r = t[e(134)], i = t.styleIndexMap;
      if (r) {
        let o = i.get(this[e(207)]);
        o != null && (n[e(207)] = o);
      }
      if (r && this.parent != null) {
        let o = r.get(this[e(211)]);
        o != null && (n[e(211)] = o);
      }
    }
    return n.data != null && (Object[e(200)](n.data).length == 0 ? delete n.data : n[e(187)] = JSON[e(147)](JSON[e(136)](n.data))), n.attributes != null && (Object[e(200)](n[e(163)]).length == 0 ? delete n.attributes : n[e(163)] = JSON.parse(JSON.stringify(n[e(163)]))), n;
  }
  [g(231)](t) {
    const e = g;
    let n = this.style;
    if (t.styleIndexMap[e(205)](n) == null) {
      let r = n.toJSON(t.indexImage);
      if (Object.keys(r)[e(226)] > 0) {
        let i = t.styles[e(226)];
        t[e(230)][e(204)](n, i), t.styles[e(213)](r);
      }
    }
  }
  _fromJSON(t) {
    const e = g, n = this, r = t.objJson;
    let i = n[e(133)], o = Object[e(182)](n);
    if (i.forEach((a) => {
      const h = e;
      if (r.hasOwnProperty(a)) {
        let l = Object[h(180)](n, a);
        if (l == null && (l = Object.getOwnPropertyDescriptor(o, a)), l != null && l[h(125)] == 0)
          return;
        let c = r[a];
        c != null && c.className != null && (c = M[h(144)](c[h(155)]), Object.assign(n, c)), n[a] = c;
      }
    }), t.objJson.style != null) {
      let a = t.styleIndexMap.get(t.objJson[e(207)]);
      n[e(207)] = a;
    }
  }
  update() {
    this[g(217)] != null && (this.ownerLayer._requestReapint = !0);
  }
  addEventListener(t, e) {
    super.addEventListener(t, e);
  }
  removeEventListener(t, e) {
    super[g(184)](t, e);
  }
  getConnectAutoPoint(t) {
    const e = g;
    return this[e(162)][e(208)](t.x, t.y, this);
  }
  set zIndex(t) {
    const e = g;
    this._zIndex = t, this[e(151)](t);
  }
  get zIndex() {
    return this[g(164)];
  }
  get x() {
    return this._x;
  }
  set x(t) {
    const e = g;
    this._x !== t && (this[e(194)] = !0), this._x = t;
  }
  get y() {
    return this._y;
  }
  set y(t) {
    this._y !== t && (this._matrixDirty = !0), this._y = t;
  }
  get z() {
    return this._z;
  }
  set z(t) {
    this._z !== t && (this._matrixDirty = !0), this._z = t;
  }
  get [g(192)]() {
    return this._width;
  }
  set width(t) {
    this.width !== t && (this._matrixDirty = !0), this._width = t;
  }
  get height() {
    return this[g(228)];
  }
  set height(t) {
    this._height !== t && (this._matrixDirty = !0), this._height = t;
  }
  get rotation() {
    return this._rotation;
  }
  set [g(219)](t) {
    this[g(189)] !== t && (this._matrixDirty = !0), this._rotation = t;
  }
  get scaleX() {
    return this._scaleX;
  }
  set [g(137)](t) {
    const e = g;
    t == 0 && (t = 1e-6), this[e(138)] !== t && (this[e(194)] = !0), this[e(138)] = t;
  }
  get scaleY() {
    return this._scaleY;
  }
  set scaleY(t) {
    const e = g;
    t == 0 && (t = 1e-6), this._scaleY !== t && (this._matrixDirty = !0), this[e(178)] = t;
  }
  get [g(181)]() {
    return this[g(152)];
  }
  set skewX(t) {
    const e = g;
    this._skewX !== t && (this._matrixDirty = !0), this[e(152)] = t;
  }
  get skewY() {
    return this._skewY;
  }
  set [g(235)](t) {
    this._skewY !== t && (this._matrixDirty = !0), this._skewY = t;
  }
  get left() {
    return this.x - 0.5 * this.width;
  }
  set [g(140)](t) {
    this.x = t + 0.5 * this.width;
  }
  get right() {
    return this.x + 0.5 * this.width;
  }
  set [g(148)](t) {
    this.x = t - 0.5 * this.width;
  }
  get top() {
    return this.y - 0.5 * this.height;
  }
  set [g(139)](t) {
    const e = g;
    this.y = t + 0.5 * this[e(123)];
  }
  get [g(174)]() {
    return this.y + 0.5 * this.height;
  }
  set [g(174)](t) {
    this.y = t - 0.5 * this.height;
  }
};
function Hi() {
  const s = ["414989OWjRfv", "frozen", "selectedEvent", "newInstance", "visible", "css", "parse", "right", "worldToLocalXY", "90AwGOCT", "setZIndex", "_skewX", "_localTransform", "substring", "className", "setAttribute", "slice", "flatten", "localPoints", "dispatchEvent", "Rect", "_shape", "attributes", "_zIndex", "prototype", "_updateTree", "draggable", "type", "482OboXqM", "isSelected", "_treeDirty", "scaleY", "37758XKplcD", "bottom", "dyInWorld", "inLinks", "pointerEnabled", "_scaleY", "2237520bvLAul", "getOwnPropertyDescriptor", "skewX", "getPrototypeOf", 'error: style class must be startWith "."', "removeEventListener", "children", "_worldTransform", "data", "_afterStyleComputed", "_rotation", "forEach", "_invertWorldTransform", "width", "dragHandler", "_matrixDirty", "pointerdownHandler", "_computedStyle", "setAttributes", "182776qZjPGd", "165CpiWpy", "keys", "toAABB", "_findChild", "updateMatrix", "set", "get", "2901wgawGR", "style", "getConnectAutoPoint", "removeChild", "indexOf", "parent", "remove", "push", "EventInstances", "21VLjZKP", "getChildren", "ownerLayer", "pointerenterEvent", "rotation", "dropAllowed", "_obb", "addInLink", "dragEndEvent", "hasChildren", "getWorldTransform", "length", "log", "_height", "dropoutEvent", "styleIndexMap", "_beforeToJSON", "1600945gHHlkx", "662120XEaqAr", "pointeroutHandler", "skewY", "getLocalPoint", "outLinks", "_state", "clickHandler", "invert", "getInLinks", "deep", "isLink", "showSelected", "height", "points", "writable", "updateZIndex", "dirty", "pointeroutEvent", "rotate", "aabb", "pointerenterHandler", "removeChildren", "_serializers", "objIndexMap", "destroy", "stringify", "scaleX", "_scaleX", "top", "left"];
  return (Hi = function() {
    return s;
  })();
}
J([p("NE")], R[g(165)], "className", 2), J([p(!0)], R.prototype, "pointerEnabled", 2), J([p(!1)], R[g(165)], "isLayer", 2), J([p(!0)], R.prototype, "serializeable", 2), J([p(0)], R.prototype, "_x", 2), J([p(0)], R.prototype, "_y", 2), J([p(1)], R.prototype, "_width", 2), J([p(1)], R.prototype, g(228), 2), J([p(0)], R.prototype, "_rotation", 2), J([p(1)], R.prototype, "_scaleX", 2), J([p(1)], R.prototype, "_scaleY", 2), J([p(0)], R.prototype, g(152), 2), J([p(0)], R.prototype, "_skewY", 2), J([p(as.getShape(g(161)))], R[g(165)], "_shape", 2), J([p(1)], R[g(165)], "_pickPrecision", 2), J([p(["className"])], R.prototype, "_allwaysSerializers", 2), J([p(["id", "name", "type", "zIndex", g(142), "selectedStyle", g(122), g(167), g(145), "origin", "classList", g(220), "data", g(163), "pointerEnabled", "title"])], R[g(165)], "_serializers", 2), J([p(0)], R[g(165)], "_zIndex", 2), J([p(!1)], R.prototype, g(142), 2), J([p(tt.MinDeep)], R.prototype, "deep", 2), J([p(!0)], R.prototype, "showSelected", 2), J([p(!0)], R.prototype, "draggable", 2), J([p(!1)], R.prototype, "isSelected", 2), J([p(!1)], R.prototype, "dropAllowed", 2);
let ct = R;
function Ea(s) {
  const t = g;
  if (s == null)
    return () => !0;
  if (typeof s == "function")
    return s;
  let e, n, r, i = s, o = s.match(/(.*)\s*(\[.*\])/);
  if (o && (i = o[1], r = o[2]), i.startsWith(".") ? n = (a) => a.classList[t(210)](i) != -1 : i.startsWith("#") ? n = (a) => a.id == i[t(154)](1) : i != "" && (n = (a) => a.className == i), r != null && (e = r.match(/\[\s*(.*?)\s*([>|<|=|!]{1,2})\s*['"]{0,1}(.*?)['"]{0,1}]$/)) != null) {
    let a = e[1], h = e[2], l = e[3], c = (u) => "" + u[a] == l;
    return h == ">" ? c = (u) => u[a] > parseInt(l) : h == ">=" ? c = (u) => u[a] >= parseInt(l) : h == "<" ? c = (u) => u[a] < parseInt(l) : h == "<=" ? c = (u) => u[a] <= parseInt(l) : h == "!=" && (c = (u) => u[a] != l), n == null ? c : (u) => n(u) && c(u);
  }
  return () => !0;
}
const rt = Qt;
function Qt(s, t) {
  const e = Ui();
  return (Qt = function(n, r) {
    return e[n -= 465];
  })(s, t);
}
function Ca(s, t, e, n) {
  return e - Or(n - s, 0, e, n) + t;
}
function Or(s, t, e, n) {
  return (s /= n) < 1 / 2.75 ? e * (7.5625 * s * s) + t : s < 2 / 2.75 ? e * (7.5625 * (s -= 1.5 / 2.75) * s + 0.75) + t : s < 2.5 / 2.75 ? e * (7.5625 * (s -= 2.25 / 2.75) * s + 0.9375) + t : e * (7.5625 * (s -= 2.625 / 2.75) * s + 0.984375) + t;
}
(function() {
  const s = Qt, t = Ui();
  for (; ; )
    try {
      if (-parseInt(s(487)) / 1 + parseInt(s(486)) / 2 * (-parseInt(s(476)) / 3) + -parseInt(s(497)) / 4 + parseInt(s(493)) / 5 * (-parseInt(s(518)) / 6) + -parseInt(s(470)) / 7 + -parseInt(s(494)) / 8 * (parseInt(s(512)) / 9) + parseInt(s(490)) / 10 === 633271)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let tl = { easeLinear: function(s, t, e, n) {
  return e * s / n + t;
}, easeInQuad: function(s, t, e, n) {
  return e * (s /= n) * s + t;
}, easeOutQuad: function(s, t, e, n) {
  return -e * (s /= n) * (s - 2) + t;
}, easeInOutQuad: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s + t : -e / 2 * (--s * (s - 2) - 1) + t;
}, easeInSine: function(s, t, e, n) {
  return -e * Math[Qt(502)](s / n * (Math.PI / 2)) + e + t;
}, easeOutSine: function(s, t, e, n) {
  return e * Math.sin(s / n * (Math.PI / 2)) + t;
}, easeInOutSine: function(s, t, e, n) {
  return -e / 2 * (Math[Qt(502)](Math.PI * s / n) - 1) + t;
}, easeInExpo: function(s, t, e, n) {
  return s == 0 ? t : e * Math.pow(2, 10 * (s / n - 1)) + t;
}, easeInOutExpo: function(s, t, e, n) {
  const r = Qt;
  return s == 0 ? t : s == n ? t + e : (s /= n / 2) < 1 ? e / 2 * Math.pow(2, 10 * (s - 1)) + t : e / 2 * (2 - Math[r(506)](2, -10 * --s)) + t;
}, easeInCirc: function(s, t, e, n) {
  return -e * (Math.sqrt(1 - (s /= n) * s) - 1) + t;
}, easeOutCirc: function(s, t, e, n) {
  return e * Math[Qt(467)](1 - (s = s / n - 1) * s) + t;
}, easeInOutCirc: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? -e / 2 * (Math.sqrt(1 - s * s) - 1) + t : e / 2 * (Math.sqrt(1 - (s -= 2) * s) + 1) + t;
}, easeInCubic: function(s, t, e, n) {
  return e * (s /= n) * s * s + t;
}, easeOutCubic: function(s, t, e, n) {
  return e * ((s = s / n - 1) * s * s + 1) + t;
}, easeInOutCubic: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s * s + t : e / 2 * ((s -= 2) * s * s + 2) + t;
}, easeInQuart: function(s, t, e, n) {
  return e * (s /= n) * s * s * s + t;
}, easeOutQuart: function(s, t, e, n) {
  return -e * ((s = s / n - 1) * s * s * s - 1) + t;
}, easeInOutQuart: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s * s * s + t : -e / 2 * ((s -= 2) * s * s * s - 2) + t;
}, easeInQuint: function(s, t, e, n) {
  return e * (s /= n) * s * s * s * s + t;
}, easeOutQuint: function(s, t, e, n) {
  return e * ((s = s / n - 1) * s * s * s * s + 1) + t;
}, easeInOutQuint: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s * s * s * s + t : e / 2 * ((s -= 2) * s * s * s * s + 2) + t;
}, easeInElastic: function(s, t, e, n) {
  const r = Qt;
  var i = 1.70158, o = 0, a = e;
  return s == 0 ? t : (s /= n) == 1 ? t + e : (o || (o = 0.3 * n), a < Math[r(478)](e) ? (a = e, i = o / 4) : i = o / (2 * Math.PI) * Math.asin(e / a), -a * Math.pow(2, 10 * (s -= 1)) * Math[r(492)]((s * n - i) * (2 * Math.PI) / o) + t);
}, easeOutElastic: function(s, t, e, n) {
  const r = Qt;
  var i = 1.70158, o = 0, a = e;
  return s == 0 ? t : (s /= n) == 1 ? t + e : (o || (o = 0.3 * n), a < Math[r(478)](e) ? (a = e, i = o / 4) : i = o / (2 * Math.PI) * Math[r(513)](e / a), a * Math.pow(2, -10 * s) * Math.sin((s * n - i) * (2 * Math.PI) / o) + e + t);
}, easeInOutElastic: function(s, t, e, n) {
  var r = 1.70158, i = 0, o = e;
  return s == 0 ? t : (s /= n / 2) == 2 ? t + e : (i || (i = n * (0.3 * 1.5)), o < Math.abs(e) ? (o = e, r = i / 4) : r = i / (2 * Math.PI) * Math.asin(e / o), s < 1 ? o * Math.pow(2, 10 * (s -= 1)) * Math.sin((s * n - r) * (2 * Math.PI) / i) * -0.5 + t : o * Math.pow(2, -10 * (s -= 1)) * Math.sin((s * n - r) * (2 * Math.PI) / i) * 0.5 + e + t);
}, easeInBack: function(s, t, e, n, r) {
  return r == null && (r = 1.70158), e * (s /= n) * s * ((r + 1) * s - r) + t;
}, easeOutBack: function(s, t, e, n, r) {
  return r == null && (r = 1.70158), e * ((s = s / n - 1) * s * ((r + 1) * s + r) + 1) + t;
}, easeInOutBack: function(s, t, e, n, r) {
  return r == null && (r = 1.70158), (s /= n / 2) < 1 ? e / 2 * (s * s * ((1 + (r *= 1.525)) * s - r)) + t : e / 2 * ((s -= 2) * s * ((1 + (r *= 1.525)) * s + r) + 2) + t;
}, easeInBounce: Ca, easeOutBounce: Or, easeInOutBounce: function(s, t, e, n) {
  return s < n / 2 ? 0.5 * Ca(2 * s, 0, e, n) + t : 0.5 * Or(2 * s - n, 0, e, n) + 0.5 * e + t;
} };
class oh {
  constructor(t) {
    const e = Qt;
    this.duration = 1e3, this[e(471)] = 0, this[e(488)] = "normal", this[e(477)] = e(473), this.playState = e(479), this.isPause = !1, this.finished = !1, this.delayed = !1, this[e(503)] = 1, this.playedTimes = 0, this[e(510)] = e(468), this.setAttributes(t);
  }
  [rt(505)](t) {
    return Object.assign(this, t), this;
  }
  onUpdate(t) {
    return this[rt(474)] = t, this;
  }
  [rt(484)]() {
    const t = rt;
    return this.system && this.system[t(466)](this), this.reject && (this.reject(), this.reject = null), this.playState = t(507), this;
  }
  pause() {
    const t = rt;
    return this[t(481)] = "paused", this[t(509)] = !0, this;
  }
  [rt(482)]() {
    const t = rt;
    return this.startTime = Date.now() - this.currentTime, this[t(481)] = t(514), this.isPause = !1, this;
  }
  [rt(489)](t) {
    const e = rt;
    if (this.playState != "running")
      return !1;
    let n = t - this[e(517)];
    return this.currentTime = n, n >= this.duration ? (this[e(481)] = "finished", this[e(498)](this.duration), this[e(501)] && this.object.markDirty(), this[e(483)] < this[e(503)] ? this.play() : (this.resolve(), this.resolve = null, this.onEnd && this.onEnd())) : (this.stepAction(n), this[e(501)] && this.object.markDirty()), !0;
  }
  play() {
    const t = rt;
    let e = this;
    this.system.add(this), this.playedTimes++, this.isPause = !1, this.delay != 0 && this[t(500)] == 0 ? (setTimeout(function() {
      const o = t;
      e.startTime = Date.now(), e.playState = o(514);
    }, this[t(471)]), e.delayed = !0) : (e.startTime = Date.now(), e.playState = "running");
    const n = this;
    let r = this._getTickAction();
    this.stepAction = r;
    let i = this.promise;
    return i == null && (i = new Promise(function(o, a) {
      n[t(516)] == null && (n.resolve = o, n.reject = a);
    }), this.promise = this[t(515)]), i.catch((o) => {
    });
  }
  [rt(480)]() {
    const t = rt;
    let e = this.effect || "easeLinear", n = this[t(485)], r = this.to, i = this.duration, o = this[t(474)], a = n, h = r;
    if (typeof n == t(496) && (a = [n], h = [r]), this.direction == "reverse" || this.direction == "alternate-reverse") {
      let _ = a;
      a = h, h = _;
    }
    let l = a[0];
    const c = Array[t(472)](n), u = typeof l == "number", d = l.x != null || l.y != null;
    let f, y = a.slice(), I = tl[e], x = this[t(488)] == t(465) || this.direction == "alternate-reverse", m = this, b = 0.5 * this.duration;
    if (u)
      f = function(_) {
        let k = _;
        x && (k = _ > b ? 2 * m[t(511)] - 2 * k : 2 * _);
        for (let v = 0; v < a.length; v++) {
          const A = a[v], W = h[v] - A;
          if (W == 0)
            y[v] = A;
          else {
            let it = I(k, A, W, i);
            y[v] = it;
          }
        }
        o(c ? y : y[0]);
      };
    else {
      if (!d)
        throw new Error("value format error.");
      f = function(_) {
        for (let k = 0; k < a.length; k++) {
          const v = a[k], A = h[k], W = A.x - v.x, it = A.y - v.y;
          let Et = { x: v.x, y: v.y };
          W != 0 && (Et.x = I(_, v.x, W, i)), it != 0 && (Et.y = I(_, v.y, it, i)), y[k] = Et;
        }
        o(c ? y : y[0]);
      };
    }
    return f;
  }
}
function Ui() {
  const s = ["idle", "_getTickAction", "playState", "continue", "playedTimes", "cancel", "from", "163642KojZqi", "264278EKUIRe", "direction", "tick", "24596910SUzRwq", "hasAENode", "sin", "325RynlZN", "8NTUjoa", "aeNodes", "number", "1986016IMuisf", "stepAction", "forEach", "delayed", "object", "cos", "times", "play", "setAttributes", "pow", "finished", "delete", "isPause", "effect", "duration", "3873321pXpzup", "asin", "running", "promise", "resolve", "startTime", "25800AlkWur", "cancelAll", "alternate", "remove", "sqrt", "easeLinear", "animations", "1917636ylGMrH", "delay", "isArray", "none", "update", "setupAE", "3ImBaSX", "fillMode", "abs"];
  return (Ui = function() {
    return s;
  })();
}
class el {
  constructor() {
    const t = rt;
    this.animations = /* @__PURE__ */ new Set(), this[t(495)] = /* @__PURE__ */ new WeakSet(), this.timeline = { begin: 17645184e5, end: Date.now() };
  }
  hasAENode(t) {
    return this.aeNodes.has(t);
  }
  addAENode(t) {
    const e = rt;
    !this[e(491)](t) && t[e(475)](), t.animationSystem = this, t[e(469)][e(499)]((n, r) => {
      const i = e;
      n.object = t, n.system = this, n[i(504)]();
    }), this.aeNodes.add(t);
  }
  removeAENode(t) {
    const e = rt;
    t.animationSystem = null, t[e(469)].forEach((n, r) => {
      n.cancel();
    }), this[e(495)][e(508)](t);
  }
  add(t) {
    t.system = this, this.animations.add(t);
  }
  remove(t) {
    const e = rt;
    this.animations[e(508)](t);
  }
  [rt(519)]() {
    for (let t of this.animations.values())
      t.cancel();
    this.animations.clear();
  }
  [rt(489)](t) {
    let e = !1;
    return this.animations.forEach((n) => {
      const r = Qt;
      n[r(489)](t) && e == 0 && (e = !0), n[r(481)] == r(507) && this.animations.delete(n);
    }), e;
  }
  anime(t) {
    return this.anim(t);
  }
  anim(t) {
    t.duration == null && (t.duration = 1e3);
    let e = new oh();
    return e.system = this, e.setAttributes(t), e;
  }
}
function ah(s, t) {
  const e = Yi();
  return (ah = function(n, r) {
    return e[n -= 213];
  })(s, t);
}
(function() {
  const s = ah, t = Yi();
  for (; ; )
    try {
      if (parseInt(s(221)) / 1 + -parseInt(s(219)) / 2 + parseInt(s(220)) / 3 * (-parseInt(s(214)) / 4) + -parseInt(s(218)) / 5 * (parseInt(s(217)) / 6) + parseInt(s(213)) / 7 + parseInt(s(215)) / 8 * (-parseInt(s(216)) / 9) + -parseInt(s(223)) / 10 * (-parseInt(s(222)) / 11) === 633723)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Ji = /* @__PURE__ */ new Map([["lt", { x: -1, y: -1 }], ["ct", { x: 0, y: -1 }], ["rt", { x: 1, y: -1 }], ["lm", { x: -1, y: 0 }], ["center", { x: 0, y: 0 }], ["rm", { x: 1, y: 0 }], ["lb", { x: -1, y: 1 }], ["cb", { x: 0, y: 1 }], ["rb", { x: 1, y: 1 }]]), nl = /* @__PURE__ */ new Map(), sl = Ji.keys();
function Yi() {
  const s = ["4762134ZerkCi", "5fOUBos", "1119384GvqofS", "3RRzazg", "93281IRnfgO", "17507006QtmOud", "20IIVulZ", "1591534NTbRdn", "1011652JHzCpd", "5054872PVUVYw", "18QyZjEi"];
  return (Yi = function() {
    return s;
  })();
}
for (let s of sl) {
  let t = Ji.get(s), e = B.normalize([], [t.x, t.y]);
  nl.set(s, e);
}
const U = Ks;
function Xi() {
  const s = ["atan2", "beginPath", "filter", "6PoCXek", "prototype", "getOwnPropertyDescriptor", "moveTo", "getPoint", "map", "DefaultAnchors", "2314130bPFwsW", "anchors", "13CpSTyl", "44stYOGf", "1445544cSBcmX", "759095hMUetr", "quadraticCurveTo", "_getCubicBezierExtremas", "_measureDistance", "draw", "407sWtvSq", "push", "528nYazmB", "12992916dMidRR", "AutoFoldShape", "length", "className", "object", "ArcShape", "forEach", "124090zyDguy", "2077616FWXJkb", "dist", "_calcQuadBezierExtrema", "3KbpRLM", "getPoints", "segIndex", "sqrt", "getIntersect", "9LOiApO", "stroke"];
  return (Xi = function() {
    return s;
  })();
}
(function() {
  const s = Ks, t = Xi();
  for (; ; )
    try {
      if (parseInt(s(179)) / 1 * (-parseInt(s(170)) / 2) + parseInt(s(150)) / 3 * (parseInt(s(171)) / 4) + parseInt(s(172)) / 5 * (-parseInt(s(160)) / 6) + -parseInt(s(167)) / 7 + -parseInt(s(147)) / 8 * (parseInt(s(155)) / 9) + parseInt(s(187)) / 10 * (-parseInt(s(177)) / 11) + -parseInt(s(180)) / 12 * (-parseInt(s(169)) / 13) === 231269)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var rl = Object.defineProperty, il = Object[U(162)], kn = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? il(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && rl(t, e, i), i;
};
const Tr = class hh extends hn {
  constructor() {
    const t = U;
    super(), this.isClosed = !1, this[t(168)] = hh.DefaultAnchors;
  }
  [U(176)](t, e) {
    const n = U;
    let r = e.getPoints();
    if (r.length == 0)
      return;
    let i = r[0];
    t[n(158)](), t.moveTo(i.x, i.y);
    for (let a = 1; a < r.length - 1; a++)
      (r[a].x !== i.x || r[a].y !== i.y) && t.lineTo(r[a].x, r[a].y), i = r[a];
    let o = r[r.length - 1];
    t.lineTo(o.x, o.y), t.stroke();
  }
};
Tr.DefaultAnchors = /* @__PURE__ */ new Map(), kn([p("LineShape")], Tr.prototype, U(183), 2);
let Cn = Tr;
const Er = class lh extends Cn {
  constructor() {
    super(), this.anchors = lh.DefaultAnchors;
  }
};
function Ks(s, t) {
  const e = Xi();
  return (Ks = function(n, r) {
    return e[n -= 147];
  })(s, t);
}
Er.DefaultAnchors = /* @__PURE__ */ new Map(), kn([p(U(181))], Er[U(161)], "className", 2);
let ch = Er;
const Cr = class Rn extends Cn {
  constructor() {
    const t = U;
    super(), this[t(168)] = Rn[t(166)], this.isClosed = !1;
  }
  draw(t, e) {
    const n = U;
    let r = e[n(151)]();
    if (r[n(182)] == 0)
      return;
    let i = r[0], o = r[1], a = r[2];
    t.beginPath(), t.moveTo(i.x, i.y), t[n(173)](o.x, o.y, a.x, a.y), this.isClosed && t.closePath(), t[n(156)]();
  }
  getIntersect(t, e, n) {
    const r = U;
    let i = n.worldToLocalXY(t, e), o = n.getPoints(), a = o[0], h = o[1], l = o[2], c = Rn[r(175)](i.x, i.y, a.x, a.y, h.x, h.y, l.x, l.y), u = n.getPoint(c.t), d = new an(u.x, u.y);
    return d.object = n, d.dist = c.dist, d.t = c.t, d[r(152)] = 0, d;
  }
  static _measureDistance(t, e, n, r, i, o, a, h) {
    const l = U;
    function c(I) {
      const x = ms(I, n, i, a), m = ms(I, r, o, h), b = Aa(I, n, i, a), _ = Aa(I, r, o, h);
      return (x - t) * b + (m - e) * _;
    }
    function u(I) {
      return (c(I + 1e-5) - c(I)) / 1e-5;
    }
    const d = [0, 0.5, 1].map((I) => vi(c, u, I))[l(159)]((I) => I >= 0 && I <= 1);
    let f = 1 / 0, y = 0;
    return d[l(186)]((I) => {
      const x = dn(ms(I, n, i, a), ms(I, r, o, h), t, e);
      x < f && (f = x, y = I);
    }), dn(n, r, t, e) < f && (f = dn(n, r, t, e), y = 0), dn(a, h, t, e) < f && (f = dn(a, h, t, e), y = 1), { dist: f, t: y };
  }
  static [U(149)](t, e, n) {
    let r = t - 2 * e + n;
    return r === 0 ? null : (t - e) / r;
  }
  static _getQuadBezierExtremas(t, e, n) {
    const r = U, i = t.x, o = t.y, a = e.x, h = e.y, l = n.x, c = n.y, u = [];
    let d = Rn[r(149)](i, a, l);
    return d != null && d > 0 && d < 1 && u.push(d), d = Rn[r(149)](o, h, c), d != null && d > 0 && d < 1 && u[r(178)](d), u;
  }
};
Cr.DefaultAnchors = /* @__PURE__ */ new Map(), kn([p("QuadraticCurveShape")], Cr[U(161)], "className", 2);
let zs = Cr;
const Os = class Ar extends Cn {
  constructor() {
    const t = U;
    super(), this.anchors = Ar[t(166)];
  }
  draw(t, e) {
    const n = U;
    let r = e[n(151)]();
    if (r[n(182)] == 0)
      return;
    let i = r[0], o = r[1], a = r[3], h = r[4];
    t.beginPath(), t[n(163)](i.x, i.y), t.bezierCurveTo(o.x, o.y, a.x, a.y, h.x, h.y), this.isClosed && t.closePath(), t.stroke();
  }
  getIntersect(t, e, n) {
    const r = U;
    n.worldToLocalXY(t, e);
    let i = n.getPoints(), o = i[0], a = i[1], h = i[3], l = i[4], c = Ar._measureDistance(t, e, o.x, o.y, a.x, a.y, h.x, h.y, l.x, l.y), u = n[r(164)](c.t), d = new an(u.x, u.y);
    return d.object = n, d[r(148)] = c.dist, d.t = c.t, d[r(152)] = 0, d;
  }
  static _measureDistance(t, e, n, r, i, o, a, h, l, c) {
    const u = U;
    function d(v, A, W, it, Et) {
      const ne = 1 - v;
      return ne * ne * ne * A + 3 * ne * ne * v * W + 3 * ne * v * v * it + v * v * v * Et;
    }
    function f(v, A, W, it, Et) {
      const ne = 1 - v;
      return 3 * ne * ne * (W - A) + 6 * ne * v * (it - W) + 3 * v * v * (Et - it);
    }
    function y(v, A, W, it) {
      return (v - W) * (v - W) + (A - it) * (it - it);
    }
    function I(v) {
      const A = d(v, n, i, a, l), W = d(v, r, o, h, c);
      return (A - t) * f(v, n, i, a, l) + (W - e) * f(v, r, o, h, c);
    }
    function x(v) {
      const A = f(v, n, i, a, l), W = f(v, r, o, h, c);
      return A * A + W * W + I(v);
    }
    const m = [0, 0.25, 0.5, 0.75, 1].map((v) => vi(I, x, v)).filter((v) => v >= 0 && v <= 1);
    let b = 1 / 0, _ = 0;
    const k = m[u(165)]((v) => {
      const A = u, W = d(v, n, i, a, l), it = d(v, r, o, h, c), Et = Math[A(153)](y(W, it, t, e));
      return Et < b && (b = Et, _ = v), Et;
    });
    return k.push(Math[u(153)](y(n, r, t, e)), Math[u(153)](y(l, c, t, e))), { dist: Math.min(...k), t: _ };
  }
  static [U(174)](t, e, n, r) {
    const i = t.x, o = t.y, a = e.x, h = e.y, l = n.x, c = n.y, u = r.x, d = r.y, f = [], y = (I, x, m) => {
      const b = Ks;
      if (I === 0)
        return;
      const _ = x * x - 4 * I * m;
      if (_ >= 0) {
        const k = Math.sqrt(_), v = (-x + k) / (2 * I), A = (-x - k) / (2 * I);
        v > 0 && v < 1 && f.push(v), A > 0 && A < 1 && f[b(178)](A);
      }
    };
    return y(3 * (u - 3 * l + 3 * a - i), 6 * (l - 2 * a + i), 3 * (a - i)), y(3 * (d - 3 * c + 3 * h - o), 6 * (c - 2 * h + o), 3 * (h - o)), f;
  }
};
Os[U(166)] = /* @__PURE__ */ new Map(), kn([p("BezierCurveShape")], Os.prototype, "className", 2), kn([p(!1)], Os.prototype, "isClosed", 2);
let js = Os;
class uh extends Cn {
  constructor() {
    super(), this.isClosed = !1;
  }
  draw(t, e) {
    const n = U;
    let r = e[n(151)]();
    if (r.length == 0)
      return;
    let i = r[0], o = r[r[n(182)] - 1], a = 0.5 * C.distance(i.x, i.y, o.x, o.y), h = 0.5 * (i.x + o.x), l = 0.5 * (i.y + o.y);
    if (t.beginPath(), e && e.direction == Mt.anticlockwise) {
      let c = Math[n(157)](i.y - o.y, i.x - o.x);
      t.arc(h, l, a, c, c + Math.PI, !0);
    } else {
      let c = Math.atan2(i.y - o.y, i.x - o.x);
      t.arc(h, l, a, c, c + Math.PI, !1);
    }
    this.isClosed && t.closePath(), t.stroke();
  }
  [U(154)](t, e, n) {
    const r = U;
    let i = n.worldToLocalXY(t, e), o = n[r(151)](), a = o[0], h = o[o.length - 1], l = n[r(175)](a, h, i), c = n.getPoint(l.t), u = new an(c.x, c.y);
    return u[r(184)] = n, u.dist = l.dist, u.t = l.t, u.segIndex = 0, u;
  }
}
function ms(s, t, e, n) {
  const r = 1 - s;
  return r * r * t + 2 * r * s * e + s * s * n;
}
function Aa(s, t, e, n) {
  return 2 * (1 - s) * (e - t) + 2 * s * (n - e);
}
kn([p(U(185))], uh.prototype, U(183), 2);
const dr = tn;
function tn(s, t) {
  const e = Gi();
  return (tn = function(n, r) {
    return e[n -= 162];
  })(s, t);
}
(function() {
  const s = tn, t = Gi();
  for (; ; )
    try {
      if (parseInt(s(178)) / 1 * (-parseInt(s(180)) / 2) + -parseInt(s(177)) / 3 * (parseInt(s(171)) / 4) + -parseInt(s(173)) / 5 * (parseInt(s(181)) / 6) + parseInt(s(168)) / 7 + -parseInt(s(179)) / 8 * (-parseInt(s(170)) / 9) + parseInt(s(167)) / 10 * (-parseInt(s(175)) / 11) + -parseInt(s(163)) / 12 * (-parseInt(s(169)) / 13) === 255208)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ol {
  constructor() {
    this[tn(174)] = [];
  }
  toJSON(t, e) {
    const n = tn;
    let r = e[n(162)]();
    return this[n(174)][n(172)]((i, o) => {
      const a = n;
      if (i.host instanceof z) {
        let l = i.anchor, c = N.getOnLinkPoint(e, i);
        l.remember(c);
      }
      let h = i[a(176)](t);
      if (h.hasOwnProperty("target") && h.target == null) {
        console.warn("LinkPath.json.target == null");
        let l = r[0];
        return e[a(164)] == "PathLink" ? l = r[o] : o > 0 && (l = r[r[a(165)] - 1]), { className: dt.prototype[a(164)], x: l.x, y: l.y };
      }
      return h;
    });
  }
  set(t) {
    const e = tn;
    this.anchorProxyList[e(165)] = 0;
    for (let n = 0; n < t.length; n++)
      this[e(174)].push(t[n]);
  }
  setBegin(t) {
    this.anchorProxyList[0] = t;
  }
  setEnd(t) {
    const e = tn;
    if (this.anchorProxyList.length < 2)
      return void (this.anchorProxyList[1] = t);
    let n = this[e(174)].length - 1;
    this.anchorProxyList[n] = t;
  }
  getLength() {
    return this.anchorProxyList.length;
  }
  [dr(166)]() {
    return this[dr(174)][0];
  }
  getEnd() {
    const t = dr;
    let e = this.anchorProxyList.length - 1;
    return this[t(174)][e];
  }
}
function Gi() {
  const s = ["1192HqTAZK", "map", "5JQzUPi", "anchorProxyList", "132HIvWcw", "toJSON", "2169lIPYPk", "14308ASBYAE", "3408IcJeMc", "16pVRGTT", "2008662lstGdj", "getPoints", "46140aMcrtN", "className", "length", "getBegin", "382840GqNOlW", "2007278cGhObO", "3367RrtHTs", "2043HzCrNQ"];
  return (Gi = function() {
    return s;
  })();
}
function Vi() {
  const s = ["_updatePoints", "getOutLinks", "length", "unknow linkTarget type", "315980ZmRCNw", "endOffset", "_needCalcOffset", "points", "BezierLink", "ctrlPoint2", "dist", "addInLink", "_endOffset", "worldToLocalXY", "deep", "_shape", "toJSON", "borderWidth", "arrow must be Node", "allocate", "beginOffset", "getAnchor", "setEndArrow", "calcPointByAnchor", "_positionToLocalPoint", "hitTest", "getSegmentAnchor", "setEnd", "string", "_calcAZ", "className", "begin", "_middleIndex", "isLikePoint", "not yet", "localToWorldXY", "beginArrow", "isDisplayObjectHost", "setOriginPosition", "_getAABBWithText", "getConnectionAnchor", "label", "unlinkEnd", "text", "changeParent", "setOriginOnLink", "end", "applyTo", "host", "anchorProxyList", "union", "origin", "61600avPsRM", "fold1Offset", "path", "normalize", "localPoints", "_allwaysSerializers", "217TAaJbg", "_obb", "140200CNdYOk", "setLabel", "warn", "objIndexMap", "width", "_serializers", "concat", "get", "_isAlone", "endArrow", "removeInLink", "AutoFoldLink", "_upgradeParent", "getEnd", "2872449VxNPsz", "_pickPrecision", "2338470Seufmb", "2760664FSrGEn", "prototype", "_setProxies", "addChild", "addOutLink", "center", "anchor", "5OyQOCS", "_beginOffset", "isEmpty", "set", "21288906ljdNVX", "_computedStyle"];
  return (Vi = function() {
    return s;
  })();
}
const w = hs;
function hs(s, t) {
  const e = Vi();
  return (hs = function(n, r) {
    return e[n -= 215];
  })(s, t);
}
(function() {
  const s = hs, t = Vi();
  for (; ; )
    try {
      if (parseInt(s(269)) / 1 + -parseInt(s(221)) / 2 + -parseInt(s(291)) / 3 + -parseInt(s(294)) / 4 + parseInt(s(301)) / 5 * (-parseInt(s(293)) / 6) + parseInt(s(275)) / 7 * (parseInt(s(277)) / 8) + parseInt(s(215)) / 9 === 774925)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var al = Object.defineProperty, hl = Object.getOwnPropertyDescriptor, _e = (s, t, e, n) => {
  const r = hs;
  for (var i, o = n > 1 ? void 0 : n ? hl(t, e) : t, a = s[r(219)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && al(t, e, o), o;
};
class z extends ct {
  constructor(t, e, n, r, i) {
    const o = hs;
    if (super(), this._state = { _needPaint: !0, _isOutOfViewport: !1, _attrDirty: !0, points: [], az: [] }, this._drawContentDesc = { hasBorder: !1, hasBackgroundColor: !1 }, this.text = t, this._invertWorldTransform = xt[o(236)](), this.path = new ol(), e == null) {
      const a = new dt(0, 0);
      this.path[o(266)].push(new N(a));
    } else
      this.setBegin(e, r);
    if (n == null) {
      const a = new dt(0, 0);
      this[o(271)].anchorProxyList.push(new N(a));
    } else
      this.setEnd(n, i);
    this[o(276)].aabb = new O(0, 0, 1, 1);
  }
  get begin() {
    return this.path.getBegin();
  }
  get [w(263)]() {
    const t = w;
    return this[t(271)][t(290)]();
  }
  get beginOffset() {
    return this._beginOffset;
  }
  set [w(237)](t) {
    this[w(302)] = t, this._matrixDirty = !0;
  }
  get [w(222)]() {
    return this[w(229)];
  }
  set endOffset(t) {
    this[w(229)] = t, this._matrixDirty = !0;
  }
  [w(243)](t, e) {
    return new N(new Jt(null, t, e), this);
  }
  [w(238)](t) {
    const e = w;
    let n = this._shape[e(257)](t);
    if (n == null)
      throw new Error("anchor not found:" + t);
    return new N(n, this);
  }
  getSegmentCount() {
    return 1;
  }
  getRect() {
    const t = w;
    let e = this._getTotalLineWidth();
    return ue.toAABB(new O(), this._obb[t(273)], e);
  }
  get text() {
    const t = w;
    return this.label != null ? this[t(258)][t(260)] : this._text;
  }
  set [w(260)](t) {
    this.setLabel(t), this._text = t;
  }
  [w(278)](t) {
    const e = w;
    return t == null && this.label == null ? this : t instanceof E ? (Da(this, t), t.pointerEnabled = !1, t) : this[e(258)] != null && typeof t == e(245) ? (this[e(258)].text = t, this) : (function(n, r) {
      const i = w;
      if (n.label == null) {
        const o = new on(r);
        return o.draggable = !1, o.pointerEnabled = !1, o.autoSize = !0, o.setOriginOnLink(0.5), o[i(255)]("cb"), Da(n, o), o;
      }
      n[i(258)][i(260)] = r, n.label;
    }(this, t), this);
  }
  getLabel() {
    return this[w(258)];
  }
  getBeginArrow() {
    return this.beginArrow;
  }
  setBeginArrow(t) {
    const e = w;
    if (!(t instanceof E))
      throw new Error("arrow must be Node");
    let n = this;
    return n.beginArrow != null && n.removeChild(n.beginArrow), n.children.indexOf(t) == -1 && n[e(297)](t), t.draggable = !1, n.beginArrow = t, this._matrixDirty = !0, this;
  }
  getEndArrow() {
    return this.endArrow;
  }
  setEndArrow(t) {
    const e = w;
    if (!(t instanceof E))
      throw new Error(e(235));
    let n = this;
    return n.endArrow != null && n.removeChild(n[e(286)]), n.children.indexOf(t) == -1 && n.addChild(t), t.draggable = !1, n.endArrow = t, this._matrixDirty = !0, this;
  }
  _getOBBPoints() {
    return this.points = this._updatePoints(), this.points;
  }
  setBegin(t, e) {
    const n = w;
    this._matrixDirty = !0, this.begin && this[n(248)].isDisplayObjectHost() && this.begin.host.removeOutLink(this);
    let r = t instanceof N ? t : Dr(t, e);
    this.path.setBegin(r), r[n(265)] instanceof ct && r.host.addOutLink(this);
  }
  setEnd(t, e) {
    const n = w;
    this._matrixDirty = !0, this[n(263)] && this.end.isDisplayObjectHost() && this.end[n(265)].removeInLink(this);
    let r = t instanceof N ? t : Dr(t, e);
    this.path.setEnd(r), r[n(265)] instanceof ct && r[n(265)][n(228)](this);
  }
  getBeginPoint() {
    const t = w;
    return this.points == null && (this[t(224)] = this._updatePoints()), this[t(224)][0];
  }
  getEndPoint() {
    return this.points == null && (this.points = this._updatePoints()), this.points[this.points.length - 1];
  }
  _getTotalLineWidth() {
    const t = this._drawContentDesc, e = this._computedStyle;
    let n = 0.5 * (e.lineWidth || 0);
    return n += e.padding || 0, t.hasBorder && (n += e.borderWidth), n;
  }
  draw(t) {
    const e = w;
    return this[e(248)] == null || this.end == null || (this._computedStyle[e(264)](t), this._shape.draw(t, this)), this;
  }
  _afterStyleComputed() {
    const t = w, e = this[t(216)], n = this._drawContentDesc;
    n.hasBackgroundColor = e.backgroundColor != null, n.hasBorder = e[t(234)] > 0;
  }
  translateWith(t, e) {
    const n = w;
    let r = this.path.anchorProxyList;
    for (let i = 0; i < r.length; i++) {
      let o = r[i], a = o[n(300)];
      o.host == null && a instanceof dt && (a.x += t, a.y += e, this._matrixDirty = !0);
    }
    return this;
  }
  [w(246)]() {
    let t = N.getOnLinkPoint(this, this.begin), e = N.getOnLinkPoint(this, this.end), n = this._state.az;
    return n[0] = t, n[1] = e, n;
  }
  _notUpdateYet() {
    const t = w;
    console[t(279)](t(251)), this.points = this._updatePoints();
  }
  _afterUpdateMatrix() {
    this._offsetAndArrowHandle();
  }
  _offsetAndArrowHandle() {
    const t = w;
    if (this[t(253)] && this.beginArrow.parent !== this && (this.beginArrow = null), this[t(286)] && this.endArrow.parent !== this && (this.endArrow = null), !this._needCalcOffset())
      return;
    let e = { x: this[t(224)][0].x, y: this.points[0].y }, n = { x: this[t(224)][this.points.length - 1].x, y: this.points[this.points.length - 1].y };
    Na(e, this.beginArrow, this._getBeginVec(), this[t(237)] || 0), Na(n, this.endArrow, this._getEndVec(), this.endOffset || 0);
    let r = this.points;
    r[0] = e, r[r.length - 1] = n;
  }
  _updatePoints() {
    let t = this._state.points;
    t.length = 0;
    const e = this.path.anchorProxyList;
    for (let n = 0; n < e.length; n++) {
      let r = e[n], i = N.getOnLinkPoint(this, r);
      t[n] = i;
    }
    return t;
  }
  getPoints() {
    const t = w;
    return this.points == null && (this.points = this[t(217)]()), this[t(224)];
  }
  addChild(t) {
    return t[w(268)] == null && (t.origin = [0, 0]), super.addChild(t);
  }
  _getLocalTransform() {
    return this._localTransform;
  }
  _doTransform() {
  }
  getConnectAutoPoint(t) {
    let e = this[w(232)].getIntersect(t.x, t.y, this);
    return { x: e.x, y: e.y };
  }
  [w(256)]() {
    const t = w;
    let e = this.getAABB(), n = this.getLabel();
    if (n != null && !n._isTextBlank()) {
      let r = n._getAABBWithText();
      !r[t(303)]() && (e = O[t(267)](e.clone(), r));
    }
    return e;
  }
  [w(289)]() {
    const t = w;
    let e = this.begin[t(265)], n = this.end.host;
    if (e == null || n == null)
      return null;
    let r = Ts(e, n);
    return this.parent === r ? null : (this[t(261)](r), r);
  }
  [w(223)]() {
    return this.beginOffset != 0 || this.endOffset != 0 || this.beginArrow != null || this.endArrow != null;
  }
  _getBeginVec() {
    const t = w;
    let e = this.getPoint(1e-5), n = this.points[0], r = [n.x - e.x, n.y - e.y];
    return B[t(272)](r, r);
  }
  _getEndVec() {
    const t = w;
    let e = this.getPoint(0.9999999), n = this[t(224)][this[t(224)][t(219)] - 1], r = [n.x - e.x, n.y - e.y];
    return B[t(272)](r, r);
  }
  [w(285)]() {
    const t = w;
    return !this.begin[t(254)]() && !this[t(263)].isDisplayObjectHost();
  }
  unlinkBegin() {
    this.begin.isDisplayObjectHost() && this.begin.host.removeOutLink(this), this.setBegin(this.getBeginPoint());
  }
  unlinkEnd() {
    const t = w;
    this.end.isDisplayObjectHost() && this.end[t(265)][t(287)](this), this[t(244)](this.getEndPoint());
  }
  unlink() {
    const t = w;
    this.unlinkBegin(), this[t(259)](), this._matrixDirty = !0;
  }
  removeFromParent() {
    return this.unlink(), super.removeFromParent(), this;
  }
  [w(261)](t) {
    const e = w;
    if (this.parent === t)
      throw new Error("same parent, dont need change");
    let n = this, r = this;
    function i(o, a, h) {
      let l = o[a];
      l != null && (l = o.localToWorldXY(l.x, l.y), o[a] = h.worldToLocalXY(l.x, l.y));
    }
    if (r.begin instanceof dt && !r.begin.hasHost()) {
      let o = r[e(252)](r.begin.x, r.begin.y), a = t[e(230)](o.x, o.y);
      r.setBegin(a);
    }
    if (r.end instanceof dt && !r[e(263)].hasHost()) {
      let o = r.localToWorldXY(r[e(263)].x, r[e(263)].y), a = t.worldToLocalXY(o.x, o.y);
      r.setEnd(a);
    }
    return r[e(247)] == Ot.QuadBezierLink ? i(r, K.ctrlPoint, t) : r.className == Ot[e(225)] ? (i(r, K.ctrlPoint1, t), i(r, K[e(226)], t)) : r[e(247)] == Ot[e(288)] && (i(r, Ot[e(270)], t), i(r, Ot.fold2Offset, t), i(r, Ot.centerOffset, t)), n.parent && n.parent.removeChild(n), t.addChild(n), this;
  }
  [w(241)](t, e, n) {
    const r = w;
    let i = this._shape.getConnectionAnchor(t);
    if (i == null)
      throw Error("position not exist:" + t);
    return N[r(240)](this, i);
  }
  _toJSON(t) {
    const e = w;
    let n = super._toJSON(t);
    if (t != null) {
      let r = t[e(280)];
      n.path = this.path[e(233)](r, this), this.label != null && (n.label = r[e(284)](this.label)), this[e(253)] != null && (n.beginArrow = r.get(this.beginArrow)), this[e(286)] != null && (n.endArrow = r[e(284)](this.endArrow));
    }
    return n;
  }
  _afterJson(t, e) {
    const n = w;
    if (t.label != null) {
      let i = e.get(t.label);
      this.label = i;
    }
    if (t.beginArrow != null) {
      let i = e.get(t.beginArrow);
      this.setBeginArrow(i);
    }
    if (t.endArrow != null) {
      let i = e.get(t.endArrow);
      this[n(239)](i);
    }
    let r = t[n(271)].map((i) => N.fromJSON(i, e));
    this[n(296)](r);
  }
  _setProxies(t) {
    const e = w;
    this.path[e(304)](t);
    let n = this.path.getBegin();
    n.isDisplayObjectHost() && n[e(265)][e(298)](this), n = this.path[e(290)](), n.isDisplayObjectHost() && n.host[e(228)](this);
    for (let r = 1; r < t.length - 1; r++)
      n = t[r], n[e(254)]() && n.host.addInLink(this);
  }
  hitTest(t, e) {
    const n = w;
    if (this._preHitTest(t, e))
      return !0;
    let r = this._getAABBWithText(), i = this.getComputedStyle().lineWidth || 0, o = Math.max(0.5 * i, this._pickPrecision);
    if (!r.contains(t, e, o))
      return !1;
    let a = this._obb.points, h = Ht.getNearestPointOnLines(t, e, a);
    return h.dist != null && h[n(227)] < o;
  }
  _preHitTest(t, e) {
    const n = w;
    return this.endArrow != null && this.endArrow[n(242)](t, e) == 1 || this.beginArrow != null && this[n(253)].hitTest(t, e) == 1 || this[n(258)] != null && this.label.hitTest(t, e) == 1;
  }
  getInLinks() {
    return this.inLinks;
  }
  [w(218)]() {
    return this.outLinks;
  }
  destroy() {
    const t = w;
    super.destroy(), this.unlinkBegin(), this[t(259)](), this.beginArrow = null, this[t(286)] = null, this.label = null, this._shape = null, this.points = null;
  }
}
function Da(s, t) {
  const e = w;
  return s[e(258)] != null && s.removeChild(s[e(258)]), s.label = t, s.children.indexOf(s.label) == -1 && s[e(297)](s.label), t[e(262)](0.5), t;
}
function Ts(s, t) {
  const e = w;
  return s.parent === t.parent ? s.parent : s[e(231)] == t.deep ? Ts(s.parent, t.parent) : s.deep > t[e(231)] ? Ts(s.parent, t) : Ts(s, t.parent);
}
function Na(s, t, e, n) {
  let r = t ? t[w(281)] : 0;
  if (n != 0 || r != 0) {
    let i = B.scale([], e, -n - r);
    s.x += i[0], s.y += i[1];
  }
  if (r > 0) {
    let i = B.scale([], e, 0.5 * r);
    t.setXY(s.x + i[0], s.y + i[1]), t.rotate(Math.atan2(e[1], e[0]));
  }
}
function Dr(s, t) {
  const e = w;
  if (s instanceof bt)
    return new N(s);
  if (s instanceof E)
    return s.getAnchor(t || e(299));
  if (s instanceof z)
    return s.getAnchor(t || "center");
  if (C[e(250)](s)) {
    let n = s;
    return new N(new dt(n.x, n.y));
  }
  throw console.warn("unknow linkTarget type:", s), new Error(e(220));
}
_e([p("Link")], z.prototype, w(247), 2), _e([p([0, 0.5])], z.prototype, w(249), 2), _e([p(3)], z[w(295)], w(292), 2), _e([p(new Cn())], z.prototype, w(232), 2), _e([p(Hs.Link)], z.prototype, "_zIndex", 2), _e([p(!0)], z.prototype, "isLink", 2), _e([p([w(247), "isLink"])], z.prototype, w(274), 2), _e([p(ct[w(295)][w(282)][w(283)](["beginOffset", "endOffset"]))], z[w(295)], w(282), 2);
const ut = Zi;
function qi() {
  const s = ["className", "918545cTtyBZ", "host", "getConnectAutoPoint", "isDisplayObjectHost", "7673200DtemLY", "1mvnmhH", "getLocalPoint", "toPoint", "方位坐标不能用于Link", "name", "getPointOnNodeHost", "11ozbvxX", "getFunction", "equals", "unknow host or anchor", "center", "getOnLinkPoint", "get", "segIndex", "getAutoPointOnLink", "width", "_invertWorldTransform", "takePoint", "pointXY", "calcPointByAnchor", "point", "hasHost", "getPointOnLinkHost", "179286ZbHCWl", "352653pacnRA", "2972282nxKbwJ", "aabb", "4IqkPbQ", "50296690nqzSiX", "6596532CFuLSP", "189kdnGEJ"];
  return (qi = function() {
    return s;
  })();
}
function Zi(s, t) {
  const e = qi();
  return (Zi = function(n, r) {
    return e[n -= 394];
  })(s, t);
}
(function() {
  const s = Zi, t = qi();
  for (; ; )
    try {
      if (parseInt(s(411)) / 1 * (-parseInt(s(399)) / 2) + -parseInt(s(398)) / 3 + parseInt(s(401)) / 4 * (-parseInt(s(406)) / 5) + parseInt(s(397)) / 6 * (-parseInt(s(404)) / 7) + -parseInt(s(410)) / 8 + -parseInt(s(403)) / 9 + -parseInt(s(402)) / 10 * (-parseInt(s(417)) / 11) === 743383)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class N {
  constructor(t, e) {
    this.anchor = t, this.host = e;
  }
  [ut(409)]() {
    return this[ut(407)] instanceof ct;
  }
  toPoint() {
    return N[ut(430)](this.host, this.anchor);
  }
  [ut(395)]() {
    return this[ut(407)] != null;
  }
  isNodeHost() {
    return this.host instanceof E;
  }
  [ut(419)](t) {
    return this.anchor === t.anchor && this.host === t.host;
  }
  static calcPointByAnchor(t, e) {
    const n = ut;
    if (t instanceof E)
      return N.getPointOnNodeHost(t, e);
    if (t instanceof z)
      return N.getPointOnLinkHost(t, e);
    if (t == null && e instanceof dt)
      return { x: e.x, y: e.y };
    throw console.error("unknow host or anchor:", t, e), new Error(n(420));
  }
  static [ut(416)](t, e) {
    const n = ut;
    if (e instanceof Me) {
      let r = t._drawContentDesc.shapeSize;
      return { x: e.x * r[n(426)] * 0.5, y: e.y * r.height * 0.5 };
    }
    if (e instanceof mt)
      return t._positionToLocalPoint(e.name);
    if (e instanceof dt)
      return t.getWorldTransform()[n(429)](e.x, e.y);
    if (e instanceof Jt)
      return t.getLocalPoint(e.t, e[n(424)]);
    if (e instanceof wt)
      return M.getFunction(e.name)(t);
    throw new Error("unknow anchor type:" + e);
  }
  static [ut(396)](t, e) {
    const n = ut;
    let r = e.takePoint();
    if (r != null)
      return r;
    if (e instanceof Me)
      throw new Error("NDC坐标不能用于Link");
    if (e instanceof mt)
      throw new Error(n(414));
    if (e instanceof Jt)
      return t[n(412)](e.t, e.segIndex);
    if (e instanceof dt)
      return { x: e.x, y: e.y };
    if (e instanceof wt)
      return M[n(418)](e[n(415)])(t);
    throw new Error("unknow anchor type:" + e);
  }
  static getOnLinkPoint(t, e) {
    const n = ut;
    let r = t.begin == e ? t.end : t.begin, i = e.anchor, o = e[n(407)], a = i[n(428)]();
    if (a != null)
      return a;
    if (i instanceof wt)
      a = M[n(418)](i.name)(o);
    else if (i instanceof Jt || i instanceof Me || i instanceof mt) {
      let h = e[n(413)]();
      a = N.toLinkLocalPoint(t, e.host, h);
    } else
      i instanceof dt ? (a = { x: i.x, y: i.y }, o != null && (a = N.toLinkLocalPoint(t, e.host, a))) : i instanceof Kn && (a = N[n(425)](t, e, r), a = t._invertWorldTransform[n(394)](a));
    return a;
  }
  static getAutoPointOnLink(t, e, n) {
    const r = ut, i = e[r(407)];
    let o;
    if (n.anchor instanceof Kn) {
      const a = n[r(407)];
      o = { x: a._obb.aabb[r(421)], y: a._obb[r(400)].middle };
    } else
      o = N[r(422)](t, n);
    return i[r(408)](o);
  }
  static toLinkLocalPoint(t, e, n) {
    const r = ut;
    if (e.parent === t.parent)
      n = e._getLocalTransform().point(n);
    else {
      let i = e.getWorldTransform().point(n);
      n = t[r(427)].point(i);
    }
    return n;
  }
  toJSON(t) {
    const e = ut;
    let n = this.anchor.toJSON();
    if (this.host == null)
      delete n[e(407)];
    else if (t != null && this[e(409)]()) {
      let r = t[e(423)](this.host);
      n.host = r;
    }
    return n;
  }
  static fromJSON(t, e) {
    const n = ut;
    let r = M.newInstance(t[n(405)]);
    Object.assign(r, t);
    let i = new N(r);
    if (e != null && typeof t[n(407)] == "number") {
      let o = e.get(t.host);
      i.host = o;
    }
    return i;
  }
}
const L = Ie;
(function() {
  const s = Ie, t = Ki();
  for (; ; )
    try {
      if (-parseInt(s(311)) / 1 + parseInt(s(256)) / 2 + parseInt(s(258)) / 3 * (-parseInt(s(245)) / 4) + -parseInt(s(227)) / 5 * (-parseInt(s(285)) / 6) + -parseInt(s(257)) / 7 * (parseInt(s(289)) / 8) + -parseInt(s(310)) / 9 + -parseInt(s(284)) / 10 * (-parseInt(s(312)) / 11) === 311629)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var ll = Object.defineProperty, cl = Object.getOwnPropertyDescriptor, Xt = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? cl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && ll(t, e, i), i;
};
function Ki() {
  const s = ["scaleX", "text", "strokeStyle", "_toJSON", "shapeIndexMap", "_paintText", "shapeSize", "rotateByXY", "561790JJqMGl", "6JVaMCM", "updateMatrix", "endArrow", "same parent, dont need change", "2030568HUgHhu", "MinDeep", "textAlign", "translate", "origin", "_getTextRect", "Node", "setXY", "padding", "dashed", "rotateWithParent", "prototype", "length", "_textLineHeight", "isNode", "max", "lineWidth", "skewY", "_localToNormal", "center", "_textHeight", "1613646gVkDuL", "561267UyEOHo", "187oTkMxq", "_matrixDirty", "_computedStyle", "_strokeAndFill", "width", "fillStyle", "draw", "998805PJBBuo", "styleSystem", "_drawContentDesc", "_textDirty", "union", "_zIndex", "parent", "getAABB", "rotation", "_drawBackgroundOrBorder", "skewX", "textRotation", "_textArr", "translateTo", "applyTo", "isLink", "textPosition", "setText", "1290004ggJgiy", "stage", "lineHeight", "_textWidth", "color", "points", "beginArrow", "rotate", "_updateShapeSize", "_obb", "_positionToLocalPoint", "947416fgMQXa", "7AYBsRS", "3vLvBhA", "bottom", "textOffsetX", "scaleBy", "_textPosition", "measureText", "_getOBBPoints", "_state", "borderColor", "DefaultConfig", "worldToLocalXY", "_text", "beginPath", "height", "_isTextBlank", "top", "_height", "_shape"];
  return (Ki = function() {
    return s;
  })();
}
function Ie(s, t) {
  const e = Ki();
  return (Ie = function(n, r) {
    return e[n -= 221];
  })(s, t);
}
class E extends ct {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    const o = Ie;
    super(), this._state = { _needPaint: !0, _isOutOfViewport: !1, _attrDirty: !0, _textDirty: !1 }, this.originPosition = "center", this._drawContentDesc = { hasBorder: !1, hasBackgroundColor: !1, shapeSize: { width: 1, height: 1 } }, t != null && (this.text = t, this._state._textDirty = !0), this._x = e || 0, this._y = n || 0, this._width = r || 0, this[o(274)] = i || 0, this[o(254)].aabb = new O(e - 0.5 * r, n - 0.5 * i, r, i);
  }
  get text() {
    return this[Ie(269)];
  }
  set text(t) {
    this[Ie(244)](t);
  }
  _getShapeSize() {
    const t = Ie;
    return this._drawContentDesc[t(282)];
  }
  getPointAnchor(t, e) {
    return new N(new dt(t, e), this);
  }
  getSegmentAnchor(t, e) {
    return new N(new Jt(null, t, e), this);
  }
  getAnchor(t) {
    let e = this[Ie(275)].getConnectionAnchor(t);
    if (e == null)
      throw new Error("anchor not found:" + t);
    return new N(e, this);
  }
  setOriginOnLink(t, e = null) {
    const n = Ie;
    return this.origin == null ? this.origin = [e, t] : (this.origin[0] = e, this[n(293)][1] = t), this[n(221)] = !0, this;
  }
  [L(264)]() {
    const t = L;
    this._updateShapeSize();
    let e = 0.5 * this[t(224)], n = 0.5 * this.height, r = -e, i = -n;
    return [{ x: r, y: i }, { x: e, y: i }, { x: e, y: n }, { x: r, y: n }];
  }
  _afterStyleComputed() {
    const t = L, e = this._computedStyle, n = this[t(229)];
    n.hasBackgroundColor = e.backgroundColor != null, n.hasBorder = e.borderWidth > 0;
  }
  _afterUpdateMatrix() {
    const t = L;
    (this._matrixDirty || this._state._textDirty || this._computedStyle._textDirty) && (this._updateText(), this[t(265)]._textDirty && (this[t(265)]._textDirty = !1, this.updateMatrix()), this[t(265)]._textDirty = !1, this._computedStyle._textDirty = !1);
  }
  _calcOriginInParentLink() {
    const t = L, e = this.parent;
    if (this === e[t(251)] || this === e[t(287)])
      return [0, 0];
    let n = this.origin[0], r = this.origin[1], i = e.getPoint(r, n);
    return [i.x, i.y];
  }
  _getRotationOnParentLink() {
    const t = L, e = this.parent;
    if (e == null || e.deep < tt[t(290)] || e[t(303)] || !this[t(299)])
      return 0;
    let n = e;
    if (this === n.beginArrow || this === n.endArrow)
      return 0;
    let r = this[t(293)][0], i = this.origin[1];
    return e.getK(i, r);
  }
  _doTransform(t) {
    const e = L, n = this;
    if (n[e(242)])
      throw new Error("link no transform");
    let r = n[e(235)], i = n.x, o = n.y;
    if (n[e(233)]) {
      if (n[e(233)].isLink) {
        r += n._getRotationOnParentLink();
        let h = n._calcOriginInParentLink();
        i = h[0] + n.x, o = h[1] + n.y;
      } else if (n.parent[e(303)] && this.originPosition != $t[e(308)]) {
        let h = this._positionToLocalPoint(this.originPosition);
        i += h.x, o += h.y;
      }
    }
    if (n.originPosition == $t.center)
      return t[e(252)](r), void t.transform(n[e(276)], n[e(237)], n[e(306)], n.scaleY, i, o);
    let a = n[e(255)](n.originPosition);
    t[e(283)](a.x, a.y, r), t.transform(n.scaleX, n.skewX, n[e(306)], n.scaleY, i, o);
  }
  [L(253)]() {
    const t = L, e = this[t(222)];
    let n = 2 * (e.borderWidth || 0) + (2 * (e.padding || 0) + (e[t(305)] || 0));
    const r = Math.max(0, this[t(224)] - n), i = Math[t(304)](0, this[t(271)] - n);
    this._drawContentDesc.shapeSize.width = r, this._drawContentDesc[t(282)].height = i;
  }
  [L(307)](t, e) {
    const n = L;
    let r = this._drawContentDesc.shapeSize;
    return { x: t / Math.max(0.5 * r[n(224)], 1), y: e / Math[n(304)](0.5 * r.height, 1) };
  }
  [L(244)](t) {
    const e = L;
    if (t != this._text && (this._state[e(230)] = !0, this[e(221)] = !0), t == null)
      return this._text = t, void (this._textArr = null);
    if (typeof t == "number" && (t = "" + t), t.indexOf(`
`) != -1) {
      let n = t.split(`
`);
      this._textArr = n;
    } else
      this[e(239)] = null;
    this._text = t;
  }
  _calcTextSize() {
    const t = L;
    let e, n = this[t(239)] == null ? 1 : this._textArr.length, r = this._computedStyle.font;
    r == null && (r = this.ownerLayer ? this.ownerLayer[t(246)][t(228)].currentTheme.getStyle(t(267)).font : ze.DefaultFont), e = n == 1 ? Ut[t(263)](this[t(269)], this[t(222)], n, r) : Ut[t(263)](this[t(239)], this._computedStyle, n, r), this._textWidth = e.width, this[t(309)] = e.height, this[t(302)] = e[t(247)];
  }
  [L(236)](t) {
    const e = L, n = this._computedStyle, r = this._drawContentDesc;
    let i = n.borderWidth || 0, o = 0.5 * -this[e(224)] + 0.5 * i, a = 0.5 * -this[e(271)] + 0.5 * i, h = this.width - i, l = this[e(271)] - i, c = n.borderRadius || 0;
    t.save(), t[e(270)](), c == 0 ? t.rect(o, a, h, l) : t.roundRect(o, a, h, l, c), r.hasBackgroundColor && (t[e(225)] = n.backgroundColor, t.fill()), r.hasBorder && (n[e(297)] == null || n.padding == 0 ? t.lineWidth = i + 0.5 : t.lineWidth = i, t[e(278)] = n[e(266)] || "black", (n.borderStyle == e(298) || n.borderStyle == "dotted") && t.setLineDash([1, 1]), t.stroke()), t.closePath(), t.restore();
  }
  [L(223)](t) {
    let e = this._drawContentDesc;
    t.save(), (e.hasBorder || e.hasBackgroundColor) && this._drawBackgroundOrBorder(t), this._shape.draw(t, this), t.restore();
  }
  [L(226)](t) {
    const e = L;
    this._computedStyle[e(241)](t), this._strokeAndFill(t), this[e(281)](t);
  }
  _updateText() {
    this._calcTextSize(), this._calcTextPosition();
  }
  _calcTextPosition(t = 0, e = 0) {
    const n = L;
    let r = this[n(222)], i = null;
    if (r.textPosition != null) {
      let l = Ji.get(r[n(243)]);
      i = { x: l.x * this.width * 0.5, y: l.y * this[n(271)] * 0.5 };
    } else
      i = { x: 0, y: 0.5 * this.height };
    let o = 0, a = 0.5 * -(this._textHeight - this._textLineHeight), h = t + e + 0.5 * r[n(305)];
    return r.textAlign == "left" ? o = h : r[n(291)] == "right" && (o = -h), r.textBaseline == "top" ? a = h : r.textBaseline == n(259) && (a = -h - this[n(309)] + this._textLineHeight), i.x += o, i.y += a, r.textOffsetX != null && (i.x += r[n(260)]), r.textOffsetY != null && (i.y += r.textOffsetY), this[n(262)] = i, i;
  }
  _paintText(t) {
    const e = L;
    if (this[e(272)]())
      return;
    let n = this._text, r = this._computedStyle, i = this[e(262)] || { x: 0, y: 0 }, o = this._textArr;
    if (t.fillStyle = r[e(249)] || "black", this[e(238)] == 0)
      if (o == null)
        t.fillText(n, i.x, i.y);
      else {
        let a = this._textLineHeight;
        for (let h = 0; h < o.length; h++)
          t.fillText(o[h], i.x, i.y + h * a);
      }
    else {
      if (t[e(292)](i.x, i.y), t.rotate(this[e(238)]), o == null)
        t.fillText(n, 0, 0);
      else {
        let a = this._textLineHeight;
        for (let h = 0; h < o.length; h++)
          t.fillText(o[h], 0, 0 + h * a);
      }
      t[e(252)](-this.text), t.translate(-i.x, -i.y);
    }
  }
  getConnectAutoPoint(t) {
    return this[L(275)].getConnectAutoPoint(t.x, t.y, this);
  }
  setOriginPosition(t) {
    return this.originPosition = t, this;
  }
  translateWith(t, e) {
    return this.x += t, this.y += e, this;
  }
  [L(240)](t, e) {
    return this.x = t, this.y = e, this;
  }
  translate(t, e) {
    return this.x = t, this.y = e, this;
  }
  setXY(t, e) {
    return this.x = t, this.y = e, this;
  }
  resize(t, e) {
    const n = L;
    return this[n(224)] = t, this[n(271)] = e, this;
  }
  setSize(t, e) {
    return this.width = t, this.height = e, this;
  }
  skew(t, e) {
    const n = L;
    return this.skewX = t, this[n(306)] = e, this;
  }
  resizeWith(t, e) {
    const n = L;
    return this.width += t, this.height += e, this[n(224)] < 0 && (this.width = 0), this[n(271)] < 0 && (this.height = 0), this;
  }
  [L(261)](t, e) {
    return this[L(276)] *= t, this.scaleY *= e, this;
  }
  scale(t, e) {
    return this.scaleX = t, this.scaleY = e, this;
  }
  [L(252)](t) {
    return this.rotation = t, this;
  }
  rotateWith(t) {
    return this[L(235)] += t, this;
  }
  getRect() {
    const t = L;
    return new O(this.x - 0.5 * this[t(224)], this.y - 0.5 * this.height, this[t(224)], this.height);
  }
  changeParent(t) {
    const e = L;
    if (this.parent === t)
      throw new Error(e(288));
    let n = this;
    n._matrixDirty && n[e(286)](), t._matrixDirty && t.updateMatrix();
    let r = n.localToWorldXY(0, 0), i = t[e(268)](r.x, r.y);
    return n.parent && n.parent.removeChild(n), n[e(296)](i.x, i.y), t.addChild(n), this;
  }
  _positionToLocalPoint(t) {
    const e = L;
    let n = Ns[t];
    if (n == null)
      throw Error("position not exist:" + t);
    return { x: n[0] * this[e(224)] * 0.5, y: n[1] * this.height * 0.5 };
  }
  [L(279)](t) {
    const e = L;
    let n = super._toJSON(t);
    if (t != null) {
      let r = t[e(280)];
      if (this._shape != null) {
        let i = r.get(this[e(275)]);
        i != null && (n.shape = i);
      }
    }
    return n;
  }
  hitTest(t, e) {
    const n = L;
    return !this._isTextBlank() && this._getTextAABB().contains(t, e) ? !0 : !!this[n(234)]().contains(t, e) && ht.isPointInPolygon({ x: t, y: e }, this[n(254)].points);
  }
  _isTextBlank() {
    return this.text == null || this.text == "";
  }
  _getTextRect() {
    const t = L;
    if (this[t(272)]())
      return new O(0, 0, 0, 0);
    let e = this, n = e.getComputedStyle(), r = e[t(262)], i = e._textArr == null ? 1 : e._textArr[t(301)], o = new O(r.x, r.y, e[t(248)], e[t(309)]), a = n.textAlign, h = n.textBaseline;
    return a == "left" ? o.x = r.x + 0.5 * o.width : a == "right" && (o.x = r.x - 0.5 * o[t(224)]), h == t(273) ? o.y = r.y + 0.5 * o.height : h == t(259) ? i > 1 ? o.y += 0.5 * o.height - this._textLineHeight : o.y = r.y - 0.5 * o.height : i > 1 && (o.y += 0.5 * o[t(271)] - 0.5 * this._textLineHeight), o.x -= 0.5 * o.width, o.y -= 0.5 * o.height, o;
  }
  _getTextAABB() {
    const t = L;
    let e = this[t(294)]();
    if (e.isEmpty())
      return e;
    let n = this.getWorldTransform(), r = e.toPoints(), i = n[t(250)](r, r);
    return ue.toAABB(e, i);
  }
  _getAABBWithText() {
    const t = L;
    let e = this.getAABB(), n = null;
    return !this._isTextBlank() && (n = this._getTextAABB(), !n.isEmpty() && (e = O[t(231)](n, e))), e;
  }
  destroy() {
    super.destroy(), this._shape = null, this._text = null, this._textArr = null, this._state = null;
  }
}
Xt([p(L(295))], E[L(300)], "className", 2), Xt([p(!0)], E.prototype, "rotateWithParent", 2), Xt([p(null)], E.prototype, "_text", 2), Xt([p(null)], E.prototype, "_textArr", 2), Xt([p(0)], E.prototype, "_textWidth", 2), Xt([p(0)], E.prototype, "_textHeight", 2), Xt([p(0)], E.prototype, "_textLineHeight", 2), Xt([p(!0)], E.prototype, "isNode", 2), Xt([p(Hs.Node)], E.prototype, L(232), 2), Xt([p(0)], E.prototype, "textRotation", 2), Xt([p(ct.prototype._serializers.concat([L(277), "x", "y", L(224), "height", "skewX", L(306), L(276), "scaleY", "rotation", "textOffsetX", "textOffsetY", "textRotation", "originPosition", "rotateWithParent"]))], E[L(300)], "_serializers", 2);
const It = Qi;
(function() {
  const s = Qi, t = $i();
  for (; ; )
    try {
      if (-parseInt(s(138)) / 1 * (parseInt(s(129)) / 2) + parseInt(s(128)) / 3 + parseInt(s(134)) / 4 * (parseInt(s(126)) / 5) + -parseInt(s(136)) / 6 + -parseInt(s(140)) / 7 + -parseInt(s(151)) / 8 * (parseInt(s(141)) / 9) + parseInt(s(139)) / 10 === 771450)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var ul = Object[It(132)], pl = Object[It(142)], Ma = (s, t, e, n) => {
  const r = It;
  for (var i, o = n > 1 ? void 0 : n ? pl(t, e) : t, a = s[r(148)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && ul(t, e, o), o;
};
function Qi(s, t) {
  const e = $i();
  return (Qi = function(n, r) {
    return e[n -= 125];
  })(s, t);
}
class on extends E {
  constructor(t, e = 0, n = 0, r = 1, i = 1, o = !0) {
    const a = It;
    super(t, e, n, r, i), this[a(147)] = !0, this._autoSize = !0, this.autoSize = o;
  }
  get [It(131)]() {
    return this[It(130)];
  }
  set autoSize(t) {
    this._autoSize = t;
  }
  get autoDirection() {
    return this._autoDirection;
  }
  set autoDirection(t) {
    const e = It;
    this._autoDirection !== t && (this._autoDirection = t, this[e(133)]());
  }
  updateMatrix() {
    const t = It, e = this;
    if (e.autoDirection == 1) {
      let n = e[t(127)]();
      n < -Math.PI / 2 || n > Math.PI / 2 ? e.rotation !== Math.PI && (e[t(125)] = Math.PI) : e.rotation !== 0 && (e.rotation = 0);
    }
    return super.updateMatrix(), this;
  }
  _updateText() {
    const t = It;
    this._calcTextSize(), this[t(130)] && this.resizeToFitText(), this._calcTextPosition();
  }
  [It(145)]() {
    const t = It;
    let e = this._computedStyle.computePadding();
    this[t(135)] = this._textWidth + e, this.height = this._textHeight + e;
    let n = this._getOBBPoints(), r = this._worldTransform.points([], n), i = this._obb;
    return i.points = r, i[t(143)] = ue.toAABB(i.aabb, r), this;
  }
  _calcTextPosition() {
    const t = It, e = this._computedStyle;
    let n = e[t(144)] || 0, r = (e[t(146)] || 0) + (0 | e.lineWidth);
    return (e.textBaseline != "bottom" || e.textPosition != "lt" && e.textPosition != "ct" && e.textPosition != "rt") && (e.textBaseline != "top" || e[t(137)] != "lb" && e.textPosition != "cb" && e.textPosition != "rb") && (e.textAlign != "right" || e.textPosition != "lt" && e.textPosition != "lm" && e.textPosition != "lb") ? e.textAlign == "left" && (e[t(137)] == "rt" || e.textPosition == "rm" || e[t(137)] == "rb") && (n = 0, r = 0) : (n = 0, r = 0), super._calcTextPosition(n, r);
  }
}
function $i() {
  const s = ["46096tzaYNg", "rotation", "292845BdPIJJ", "_getRotationOnParentLink", "2879766uwHhaH", "360098UlPZzK", "_autoSize", "autoSize", "defineProperty", "_updateText", "36syOVPK", "width", "4698096fBqLMq", "textPosition", "4FgvHfJ", "22201720pUigGb", "3493763rsNyeF", "1458eYTQMd", "getOwnPropertyDescriptor", "aabb", "borderWidth", "resizeToFitText", "padding", "_autoDirection", "length", "prototype", "className"];
  return ($i = function() {
    return s;
  })();
}
function to() {
  const s = ["anime", "setOriginOnLink", "9vxMYQK", "313446bFJhML", "52770tfcwch", "duration", "146859dKWUOL", "setStyles", "style", "clockwise", "flow", "466WkOPsa", "animationSystem", "type", "red", "center", "327FBGDPP", "8864270GFSJIP", "lineDash", "145632JhTkdE", "95zfioWL", "font", "stage", "draggable", "1444304xzjbXO", "color", "lineDashOffset"];
  return (to = function() {
    return s;
  })();
}
Ma([p("TextNode")], on[It(149)], It(150), 2), Ma([p(E.prototype._serializers.concat([It(131), "autoDirection"]))], on.prototype, "_serializers", 2);
const fr = Qn;
function Qn(s, t) {
  const e = to();
  return (Qn = function(n, r) {
    return e[n -= 323];
  })(s, t);
}
(function() {
  const s = Qn, t = to();
  for (; ; )
    try {
      if (-parseInt(s(335)) / 1 + -parseInt(s(340)) / 2 * (parseInt(s(345)) / 3) + -parseInt(s(326)) / 4 + -parseInt(s(349)) / 5 * (parseInt(s(333)) / 6) + parseInt(s(332)) / 7 + -parseInt(s(348)) / 8 + -parseInt(s(331)) / 9 * (-parseInt(s(346)) / 10) === 212564)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class dl {
  constructor(t, e) {
    this[Qn(324)] = t, this.animationSystem = e;
  }
  flash(t, e = {}) {
    const n = Qn;
    let r = e.times || 3, i = e[n(334)] || 100, o = this[n(341)], a = t.style.globalAlpha, h = o[n(329)]({ from: [0], to: [1], update: (l) => {
      t.setStyle("globalAlpha", l[0]);
    }, times: r, effect: "easeOutBounce", duration: i });
    return h.onEnd = () => {
      t.setStyle("globalAlpha", a);
    }, h;
  }
  [fr(339)](t, e = {}) {
    const n = fr;
    let r = e[n(347)] || t[n(337)].lineDash || [3, 2], i = e.direction || Mt.clockwise, o = e[n(334)] || 1e4, a = e.distance || 300, h = i == Mt[n(338)] ? 1 : -1, l = this[n(341)];
    t.setStyle("lineDash", r);
    let c = l.anime({ from: 0, to: a, update: (u) => {
      const d = n;
      t.setStyle(d(328), -u * h);
    }, times: 1 / 0, duration: o });
    return c.onEnd = () => {
      t.setStyle("lineDashOffset", 0);
    }, c;
  }
  linkMark(t, e = { color: "red" }) {
    const n = fr;
    let r = e.text || "❌️", i = new on(r, 0, 0);
    return i[n(342)] = "EffectNode", i[n(325)] = !1, i.setStyles({ textPosition: $t[n(344)], textBaseline: Dt.middle, textAlign: At.center, color: e[n(327)] || n(343) }), e[n(323)] != null && i[n(336)]({ font: e.font }), i[n(330)](0.5), t.addChild(i), i;
  }
}
const Ba = eo;
function eo(s, t) {
  const e = no();
  return (eo = function(n, r) {
    return e[n -= 417];
  })(s, t);
}
(function() {
  const s = eo, t = no();
  for (; ; )
    try {
      if (parseInt(s(420)) / 1 * (parseInt(s(421)) / 2) + parseInt(s(424)) / 3 * (-parseInt(s(428)) / 4) + parseInt(s(427)) / 5 * (-parseInt(s(419)) / 6) + parseInt(s(426)) / 7 * (-parseInt(s(423)) / 8) + parseInt(s(422)) / 9 * (-parseInt(s(418)) / 10) + parseInt(s(429)) / 11 + -parseInt(s(430)) / 12 * (-parseInt(s(425)) / 13) === 803778)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let gr = "_jt_debug", rn = { isDebug: localStorage.getItem(gr) == Ba(417), paintAABB: !1, debugInfo: null, debugMode: function() {
  const s = Ba;
  let t = localStorage.getItem(gr) != s(417);
  localStorage.setItem(gr, "" + t), rn.isDebug = t;
} };
function no() {
  const s = ["39tXPsZJ", "406fcvSfe", "5egGzPg", "36yzqPMQ", "13119579yFivKU", "8497908CVnKSl", "true", "10fckpvJ", "8092554mVYtvc", "852710TPdSVP", "2MISvQn", "11457JoGysR", "60792ZsuwOf", "525108rNjGYN"];
  return (no = function() {
    return s;
  })();
}
const Is = en;
function en(s, t) {
  const e = so();
  return (en = function(n, r) {
    return e[n -= 191];
  })(s, t);
}
(function() {
  const s = en, t = so();
  for (; ; )
    try {
      if (-parseInt(s(194)) / 1 + -parseInt(s(222)) / 2 * (-parseInt(s(218)) / 3) + parseInt(s(202)) / 4 + parseInt(s(212)) / 5 * (-parseInt(s(192)) / 6) + parseInt(s(197)) / 7 * (parseInt(s(198)) / 8) + -parseInt(s(193)) / 9 * (-parseInt(s(195)) / 10) + -parseInt(s(210)) / 11 === 947735)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class fl {
  constructor(t) {
    const e = en;
    this[e(217)] = rn, this.numberFixed = 0, this[e(196)] = t;
  }
  init() {
    const t = en, e = document.createElement("div");
    e.classList.add("jtopo_debugPanel"), this[t(196)].layersContainer[t(220)](e), this.domElement = e, this.hide();
  }
  start(t = 24) {
    const e = en, n = this, r = this[e(196)];
    this._timer = setInterval(function() {
      const i = e;
      let o = r.inputSystem;
      if (o.isIdle)
        return;
      let a = r[i(201)], h = 0, l = 0, c = 0;
      for (let I = 0; I < a.length; I++) {
        let x = a[I];
        h += x.displayList[i(200)], l += x.getAllNodes().length, c += x.getAllLinks()[i(200)];
      }
      let u = Math.ceil(o.x), d = Math.ceil(o.y);
      const f = r.inputSystem.target;
      let y = "<li>Mouse-Canvas( x: " + u + " y: " + d + ")</li>";
      if (o.xInWorld != null && (y += "<li>Mouse-World( x: " + o.xInWorld[i(219)](2) + " y: " + o.yInWorld[i(219)](2) + ")</li>"), y += "<li>Nodes: " + l + "</li>", y += i(213) + c + i(216), y += i(206) + (l + c) + "</li>", y += "<li>Painted: " + h + "</li>", f) {
        const I = f._obb.aabb, x = f.localToWorldXY(0, 0), m = this.stage.camera[i(215)](x.x, x.y), b = this.numberFixed;
        y += i(204) + I.x.toFixed(b) + i(209) + I.y.toFixed(b) + ",w: " + I[i(211)].toFixed(b) + ", h:" + I.height[i(219)](b) + "] </li>", y += "<li>Origin: [" + f[i(207)][0].toFixed(b) + ", " + f.origin[1][i(219)](b) + "]</li>", y += "<li>&nbsp;&nbsp;-Canvas: (x: " + m.x.toFixed(b) + ", y: " + m.y.toFixed(b) + ") </li>", f instanceof E && (y += i(203) + f.x[i(219)](b) + ", y: " + f.y.toFixed(b) + ") </li>"), y += "<li>&nbsp;&nbsp;-Layer:  (x: " + x.x.toFixed(b) + ", y: " + x.y.toFixed(b) + ") </li>";
      }
      rn.debugInfo && (y += "<li>" + rn.debugInfo + "</li>"), n[i(221)](y);
    }, t);
  }
  setContent(t) {
    const e = en;
    this[e(208)][e(214)] = t;
  }
  [Is(199)]() {
    this[Is(208)] == null && this.init();
  }
  hide() {
    const t = Is;
    return this.checkDom(), clearInterval(this._timer), this.domElement[t(191)].display = "none", this;
  }
  show(t) {
    const e = Is;
    return this.checkDom(), this[e(208)][e(191)].display = e(205), this.start(t), this;
  }
}
function so() {
  const s = [",y: ", "18880620HLLtkV", "width", "815DuyjuP", "<li>Links: ", "innerHTML", "toScreenXY", "</li>", "_debug", "141FOliee", "toFixed", "appendChild", "setContent", "71784tTaWZZ", "style", "39414ThDRMN", "9zdKwKm", "502363fkKYJM", "14126750tIVoLN", "stage", "7xoLjVY", "621848PzlLZI", "checkDom", "length", "viewLayers", "4239740jxngRC", "<li>&nbsp;&nbsp;-Parent: (x: ", "<li>_aabb:[x:", "block", "<li>Total: ", "origin", "domElement"];
  return (so = function() {
    return s;
  })();
}
const vt = Qs;
function Qs(s, t) {
  const e = ro();
  return (Qs = function(n, r) {
    return e[n -= 301];
  })(s, t);
}
function ro() {
  const s = ["815QjrwrJ", "getChildrenRect", "addChild", "fromObject", "1012308FYvmCV", "2457120cKMtjP", "19647vpldeD", "249248TwibPT", "children", "length", "928oauZtj", "3130985uBBHaE", "text", "6twatnE", "object", "setObject", "7NCTFlD", "push", "412FBwhuj", "height", "flatten", "width", "36TrXsyp", "rect", "getRect", "75479EggAyv", "level", "parent"];
  return (ro = function() {
    return s;
  })();
}
(function() {
  const s = Qs, t = ro();
  for (; ; )
    try {
      if (-parseInt(s(315)) / 1 + -parseInt(s(325)) / 2 * (parseInt(s(303)) / 3) + -parseInt(s(308)) / 4 * (parseInt(s(318)) / 5) + parseInt(s(322)) / 6 * (parseInt(s(306)) / 7) + parseInt(s(328)) / 8 * (-parseInt(s(324)) / 9) + -parseInt(s(323)) / 10 + parseInt(s(301)) / 11 * (parseInt(s(312)) / 12) === 182167)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class mn {
  constructor(t = 0, e = 0, n = 1, r = 1) {
    const i = Qs;
    this.x = 0, this.y = 0, this[i(311)] = 1, this.height = 1, this[i(313)] = new O(0, 0, 1, 1), this.children = [], this[i(304)] = null, this[i(316)] = 0, this.x = t, this.y = e, this.width = n, this[i(309)] = r;
  }
  [vt(321)](t) {
    const e = vt;
    this.object = t, this.x = t.x, this.y = t.y, this.width = t[e(311)], this.height = t.height;
  }
  [vt(305)](t) {
    this.object = t;
  }
  [vt(314)](t = !1) {
    const e = vt;
    return this.rect.setTo(this.x, this.y, this[e(311)], this.height), t ? O.union(this[e(313)], this[e(319)](!0)) : this.rect;
  }
  [vt(319)](t) {
    let e = this[vt(326)], n = e[0].getRect(t);
    for (let r = 1; r < e.length; r++)
      n = O.union(n, e[r].getRect(t));
    return n;
  }
  translateWith(t, e) {
    this.x += t, this.y += e;
  }
  translate(t, e) {
    this.x = t, this.y = e;
  }
  [vt(320)](t) {
    t[vt(317)] = this, this.children.push(t);
  }
  translateWithRecursive(t, e) {
    const n = vt;
    this.translateWith(t, e);
    let r = this.children;
    for (let i = 0; i < r[n(327)]; i++)
      r[i].translateWithRecursive(t, e);
  }
  flatten(t) {
    const e = vt;
    let n = [];
    for (let r = 0; r < this.children[e(327)]; r++) {
      let i = this.children[r];
      if ((t == null || t(i) == 1) && (n[e(307)](i), i.children && i.children.length > 0)) {
        let o = mn[e(310)](i[e(326)], t);
        n = n.concat(o);
      }
    }
    return n;
  }
  toString() {
    const t = vt;
    return this.object[t(302)] + ": 	" + mn.flatten(this.children).map((e) => e[t(304)].text).join(",");
  }
  static getVNodeUnionRect(t) {
    const e = vt;
    let n = t[0][e(314)]();
    for (let r = 1; r < t.length; r++)
      n = O.union(n, t[r].getRect());
    return n;
  }
  static flatten(t, e) {
    const n = vt;
    let r = [];
    for (let i = 0; i < t[n(327)]; i++) {
      let o = t[i];
      if ((e == null || e(o) == 1) && (r.push(o), o.children && o.children.length > 0)) {
        let a = mn.flatten(o[n(326)], e);
        r = r.concat(a);
      }
    }
    return r;
  }
}
const xs = In;
function In(s, t) {
  const e = io();
  return (In = function(n, r) {
    return e[n -= 347];
  })(s, t);
}
(function() {
  const s = In, t = io();
  for (; ; )
    try {
      if (parseInt(s(357)) / 1 * (parseInt(s(364)) / 2) + -parseInt(s(351)) / 3 + -parseInt(s(366)) / 4 + parseInt(s(352)) / 5 * (parseInt(s(356)) / 6) + -parseInt(s(355)) / 7 * (parseInt(s(350)) / 8) + -parseInt(s(353)) / 9 * (-parseInt(s(365)) / 10) + parseInt(s(354)) / 11 * (-parseInt(s(347)) / 12) === 212871)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class gl {
  constructor(t) {
    const e = In;
    this[e(349)] = 0, this.root = t, this.descendants = t.flatten(), this.allVirtualNodes = [t][e(363)](this[e(367)]), this.allObjects = this.allVirtualNodes[e(361)]((n) => n.object), this.indexData = [], this.index();
  }
  index() {
    const t = In;
    let e = [];
    const n = this;
    (function r(i, o) {
      const a = In;
      n.deep < o && (n.deep = o);
      let h = i.children, l = e[o];
      l == null && (l = [], e[o] = l), l[a(359)](i);
      for (let c = 0; c < h.length; c++)
        r(h[c], o + 1);
    })(this.root, 0), this[t(362)] = e;
  }
  [xs(360)]() {
    const t = xs, e = this.root.flatten();
    if (e.length == 0)
      throw new Error("getRect() in empty tree");
    let n = e[0][t(360)]();
    for (let r = 1; r < e.length; r++) {
      const i = e[r];
      n = O.union(n, i[t(360)]());
    }
    return n;
  }
  centerTo(t, e) {
    const n = xs, r = this[n(348)];
    let i = this[n(358)][n(360)]();
    r[n(368)]((l) => {
      const c = n;
      i = O.union(i, l[c(360)]());
    });
    let o = i.getCenter(), a = t - o.x, h = e - o.y;
    return r[n(368)]((l) => {
      l.translateWith(a, h);
    }), this;
  }
  translateTo(t, e) {
    const n = this.allVirtualNodes;
    let r = this.root.getRect();
    n.forEach((a) => {
      r = O.union(r, a.getRect());
    });
    let i = t - r.x, o = e - r.y;
    return n.forEach((a) => {
      a.translateWith(i, o);
    }), this;
  }
  translateWith(t, e) {
    return this[xs(348)].forEach((n) => {
      n.translateWith(t, e);
    }), this;
  }
  getLeafs() {
    return this.indexData[this.deep];
  }
}
function io() {
  const s = ["deep", "538480zzSrCU", "71031XUpclo", "5JEFUMz", "5823cNYofk", "2708211ehNdOo", "7GGHtHl", "2209980PknRxT", "19VWiJBQ", "root", "push", "getRect", "map", "indexData", "concat", "17432yWvFXu", "5730LkGoyU", "433620mKXYRf", "descendants", "forEach", "24oThCxS", "allVirtualNodes"];
  return (io = function() {
    return s;
  })();
}
const ot = pe;
function oo() {
  const s = ["outputs", "push", "187350FPlinZ", "667657tgVIPX", "10OzIqPD", "getDegree", "isTrace", "22010714ptffSa", "2854107TAUdOD", "isClose", "getMinDegree", "420850ROGGTr", "length", "inputs", "2231248QcdBLt", "isAdjacent", "from", "isCycle", "2hcCupb", "16uhREWS", "isSubGraph", "getInDegree", "812399wmKfGg", "hasDirection", "clone", "depth", "48wFRLYh", "vertexes"];
  return (oo = function() {
    return s;
  })();
}
(function() {
  const s = pe, t = oo();
  for (; ; )
    try {
      if (parseInt(s(362)) / 1 * (parseInt(s(349)) / 2) + -parseInt(s(361)) / 3 + parseInt(s(373)) / 4 + parseInt(s(370)) / 5 * (parseInt(s(357)) / 6) + -parseInt(s(353)) / 7 + -parseInt(s(350)) / 8 * (-parseInt(s(367)) / 9) + parseInt(s(363)) / 10 * (-parseInt(s(366)) / 11) === 353594)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class xn {
  constructor() {
    const t = pe;
    this[t(372)] = [], this[t(359)] = [];
  }
  getDegree() {
    return this[pe(352)]() + this.getOutDegree();
  }
  getInDegree() {
    return this.inputs.length;
  }
  getOutDegree() {
    const t = pe;
    return this.outputs[t(371)];
  }
  getAdjacentList() {
    let t = this.outputs.map((n) => n.to), e = this.inputs.map((n) => n.from);
    return t.concat(e);
  }
}
class Nr {
  constructor(t, e) {
    const n = pe;
    this.weight = 0, this[n(347)] = t, this.to = e, t.outputs[n(360)](this), e.inputs.push(this);
  }
  isLoop() {
    return this[pe(347)] === this.to;
  }
  [ot(374)](t) {
    const e = ot;
    return this[e(347)] === t[e(347)] || this.from === t.to || this.to === t[e(347)] || this.to === t.to;
  }
}
function pe(s, t) {
  const e = oo();
  return (pe = function(n, r) {
    return e[n -= 347];
  })(s, t);
}
class yl {
  constructor(t) {
    this.vertexes = t;
  }
  [ot(368)](t) {
    return !1;
  }
  isTrace(t) {
    return !1;
  }
  isCircuit(t) {
    const e = ot;
    return this.isClose(t) && this[e(365)](t);
  }
  isTrack(t) {
    return !1;
  }
  [ot(348)](t) {
    return this.isClose(t) && this.isTrack(t);
  }
}
class $n {
  constructor(t, e) {
    this[ot(354)] = !0, this.vertexes = t, this.edges = e;
  }
  isZero() {
    const t = ot;
    return this.vertexes.length > 0 && this.edges[t(371)] == 0;
  }
  isAlone() {
    const t = ot;
    return this.vertexes.length == 1 && this.edges[t(371)] == 0;
  }
  traverse(t, e = ot(356), n = [], r = /* @__PURE__ */ new Set()) {
    const i = ot;
    t == null && (t = this[i(358)][0]);
    let o = this;
    if (!r.has(t) && (n[i(360)](t), r.add(t)), e == "depth")
      t.getAdjacentList().filter((a) => !r.has(a)).map((a) => {
        !r.has(a) && (n.push(a), r.add(a)), o.traverse(a, e, n, r);
      });
    else {
      let a = t.getAdjacentList().filter((h) => !r.has(h));
      a.map((h) => {
        n[i(360)](h), r.add(h);
      }), a.map((h) => {
        o.traverse(h, e, n, r);
      });
    }
    return n;
  }
  getMaxDegreeVertext() {
    let t = this.vertexes[0];
    for (let e = 1; e < this.vertexes.length; e++) {
      const n = this.vertexes[e];
      n.getDegree() > t.getDegree() && (t = n);
    }
    return t;
  }
  [ot(369)]() {
    const t = ot;
    let e = this.vertexes[0].getDegree();
    for (let n = 1; n < this.vertexes.length; n++) {
      const r = this[t(358)][n];
      r.getDegree() < e && (e = r[t(364)]());
    }
    return e;
  }
  getPathList(t, e, n = /* @__PURE__ */ new Set()) {
    return [];
  }
  getOrder() {
    return this.vertexes.length;
  }
  isBridge() {
  }
  [ot(351)](t) {
  }
  isTree() {
    const t = ot;
    return this[t(358)][t(371)] != this.edges[t(371)] + 1 ? !1 : this.vertexes.length == 1 ? !0 : this.vertexes.filter((e) => e[t(364)]() == 1).length > 0;
  }
  travelNext(t) {
    let e = [];
    return function n(r) {
      const i = pe;
      e.push(r);
      let o = r[i(359)].map((a) => a.to);
      for (let a = 0; a < o.length; a++) {
        let h = o[a];
        if (h === t)
          return;
        n(h);
      }
    }(t), e;
  }
  [ot(355)]() {
    const t = ot;
    let e = this.vertexes.slice();
    e.forEach((i) => {
      i[pe(372)] = i.inputs.slice(), i.outputs = i.outputs.slice();
    });
    let n = this.edges.slice(), r = new $n(e, n);
    return r[t(354)] = this.hasDirection, r;
  }
  check() {
    const t = ot;
    let e = 0;
    this.vertexes.forEach((r) => e += r[t(364)]()), console.assert(e == 2 * this.edges[t(371)]);
    let n = this.vertexes.filter((r) => r[t(364)]() % 2 != 0).length;
    console.assert(n % 2 == 0);
  }
}
const ln = bn;
function bn(s, t) {
  const e = ao();
  return (bn = function(n, r) {
    return e[n -= 358];
  })(s, t);
}
(function() {
  const s = bn, t = ao();
  for (; ; )
    try {
      if (parseInt(s(368)) / 1 * (parseInt(s(388)) / 2) + parseInt(s(366)) / 3 * (parseInt(s(375)) / 4) + parseInt(s(387)) / 5 * (parseInt(s(376)) / 6) + parseInt(s(362)) / 7 * (parseInt(s(369)) / 8) + parseInt(s(372)) / 9 + -parseInt(s(371)) / 10 + -parseInt(s(379)) / 11 === 561308)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Ln {
  static createMinimalSpanningTree(t) {
    const e = bn;
    let n = [], r = [], i = t.edges[e(360)]((a, h) => {
      const l = e;
      let c = a.weight - h[l(391)];
      return c == 0 && (c = a.from.getInDegree() - h.from.getInDegree(), c == 0 && (c = h.to.getOutDegree() - a.to[l(374)]())), c;
    }), o = /* @__PURE__ */ new WeakMap();
    for (let a = 0; a < i[e(386)]; a++) {
      const h = i[a];
      let l = h.from, c = h.to, u = o.get(l), d = o[e(377)](c);
      if (u != null && d != null)
        continue;
      u == null && (u = new xn(), u[e(385)] = l.object, n.push(u), o.set(l, u)), d == null && (d = new xn(), d.object = c[e(385)], n[e(380)](d), o[e(363)](c, d));
      let f = new Nr(u, d);
      f.object = h.object, r.push(f);
    }
    return new $n(n, r);
  }
  getNodes(t) {
    const e = bn;
    return t.vertexes.map((n) => n[e(385)]);
  }
  getLinks(t) {
    return t[bn(390)].map((e) => e.object);
  }
  [ln(367)](t) {
    const e = ln, n = t.filter((h) => h instanceof E);
    let r = t.filter((h) => h instanceof z);
    r.filter((h) => h.begin[e(381)]() && h.end.isNodeHost());
    const i = /* @__PURE__ */ new WeakMap(), o = n.map((h) => {
      const l = e, c = new xn();
      return c[l(385)] = h, i[l(363)](h, c), c;
    });
    r.filter((h) => {
      const l = e;
      return i.get(h[l(389)].host) && i.get(h[l(359)][l(373)]);
    });
    const a = r.map((h) => {
      const l = e;
      let c = i[l(377)](h.begin[l(373)]), u = i.get(h.end.host), d = new Nr(c, u);
      return d[l(385)] = h, d;
    });
    return this.toGraphs(o, a);
  }
  toGraphs(t, e) {
    const n = ln;
    let r = [];
    t[n(370)]((a) => {
      let h = a[n(384)], l = a.outputs;
      r = r.concat(h), r = r.concat(l);
    });
    let i = [], o = /* @__PURE__ */ new Set();
    for (let a = 0; a < t[n(386)]; a++) {
      const h = t[a];
      if (o[n(383)](h))
        continue;
      let l = [], c = [];
      this.travelVertext(h, l, c, o);
      let u = new $n(l, c);
      i.push(u);
    }
    return i;
  }
  travelVertext(t, e = [], n = [], r = /* @__PURE__ */ new Set()) {
    const i = ln;
    if (r.has(t))
      return;
    e.push(t), r.add(t);
    let o = t.inputs[i(361)]((l) => !r.has(l)), a = t[i(378)].filter((l) => !r[i(383)](l));
    o[i(370)]((l) => {
      n[i(380)](l), r.add(l);
    }), a[i(370)]((l) => {
      n[i(380)](l), r.add(l);
    });
    let h = this;
    o.forEach((l) => {
      h.travelVertext(l.from, e, n, r);
    }), a.forEach((l) => {
      h.travelVertext(l.to, e, n, r);
    });
  }
  [ln(358)](t) {
    const e = ln;
    !t.isTree() && (t = Ln.createMinimalSpanningTree(t));
    let n = t[e(365)].filter((h) => h[e(382)]() == 0)[0].object, r = t.vertexes.map((h) => h.object), i = t.edges.map((h) => h.object);
    const o = /* @__PURE__ */ new WeakMap();
    let a = new mn();
    return a[e(364)](n), o.set(n, a), r.forEach((h) => {
      if (h === n)
        return;
      const l = new mn();
      l.fromObject(h), o.set(h, l);
    }), i.forEach((h) => {
      const l = e;
      let c = o.get(h.begin.host), u = o.get(h[l(359)].host);
      c.addChild(u);
    }), new gl(a);
  }
}
function ao() {
  const s = ["forEach", "2575340lCSNWQ", "2081556cpRGMT", "host", "getOutDegree", "2492044shJnhb", "3147036xtLyAf", "get", "outputs", "23281280UUtEcj", "push", "isNodeHost", "getInDegree", "has", "inputs", "object", "length", "10csoTkC", "200GRaGVE", "begin", "edges", "weight", "toTree", "end", "sort", "filter", "7FjdNld", "set", "fromObject", "vertexes", "3vuQCMr", "objectsToGraphs", "9076hAFudv", "995320dpVBSX"];
  return (ao = function() {
    return s;
  })();
}
const Se = oe;
function ho() {
  const s = ["pairwise", "map", "502762mubjSC", "140ivPKvw", "666744lXprMT", "observers", "5wPliTL", "9hrHukk", "build", "3FoKakV", "push", "1TBCvEO", "1810636vvNTzp", "852IRvSAd", "fromEvent", "unsubscribe", "forEach", "10791256DeWZLF", "publish", "key", "226534pEgSSu", "subscribe", "next", "9092262qhVMES", "7783152hbemAK", "complete"];
  return (ho = function() {
    return s;
  })();
}
function oe(s, t) {
  const e = ho();
  return (oe = function(n, r) {
    return e[n -= 429];
  })(s, t);
}
(function() {
  const s = oe, t = ho();
  for (; ; )
    try {
      if (-parseInt(s(437)) / 1 * (parseInt(s(454)) / 2) + parseInt(s(435)) / 3 * (parseInt(s(438)) / 4) + parseInt(s(432)) / 5 * (parseInt(s(449)) / 6) + parseInt(s(443)) / 7 + -parseInt(s(450)) / 8 * (-parseInt(s(433)) / 9) + parseInt(s(429)) / 10 * (parseInt(s(446)) / 11) + -parseInt(s(439)) / 12 * (parseInt(s(430)) / 13) === 878025)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Be {
  constructor() {
    this.observers = [];
  }
  publish(t) {
    return this.observers.forEach((e) => {
      const n = oe;
      typeof e == "function" ? e(t) : e[n(448)] && e[n(448)](t);
    }), this;
  }
  complete() {
    const t = oe;
    return this[t(431)].forEach((e) => {
      const n = t;
      typeof e == "function" || e[n(451)] && e[n(451)]();
    }), this;
  }
  error(t) {
    return this.observers.forEach((e) => {
      typeof e == "function" || e.error && e.error(t);
    }), this;
  }
  subscribe(t) {
    const e = oe;
    if (this.observers.indexOf(t) != -1)
      throw new Error("重复订阅");
    return this[e(431)].push(t), this;
  }
  build(t) {
    const e = oe;
    let n = new Be();
    return this[e(447)]((r) => {
      t(n, r);
    }), n;
  }
  filter(t) {
    return this[oe(434)]((e, n) => {
      t(n) && e.publish(n);
    });
  }
  [Se(453)](t) {
    return this[Se(434)]((e, n) => {
      e.publish(t(n));
    });
  }
  reduce(t, e) {
    let n = e, r = !0;
    return this[Se(434)]((i, o) => {
      r && e == null ? (r = !1, n = o) : n = t(o, n), i.publish(n);
    });
  }
  distinct() {
    const t = Se;
    let e = "-#distinct#-";
    return this[t(434)]((n, r) => {
      e !== r && (e = r, n[t(444)](r));
    });
  }
  debounceTime(t) {
    let e;
    return this.build((n, r) => {
      e != null && clearTimeout(e), e = setTimeout(() => {
        n.publish(r);
      }, t);
    });
  }
  delay(t) {
    return this.build((e, n) => {
      setTimeout(() => {
        e.publish(n);
      }, t);
    });
  }
  [Se(452)](t = 2) {
    return this.bufferCount(t, 1);
  }
  bufferCount(t, e = 1) {
    let n = [];
    return this.build((r, i) => {
      if (n[oe(436)](i), n.length == t) {
        r.publish(n);
        for (let o = 0; o < e; o++)
          n.shift();
      }
    });
  }
  unsubscribe() {
    this[Se(431)].length = 0;
  }
  static fromEvent(t, e) {
    const n = Se;
    let r = new Be(), i = (o) => {
      r.publish(o);
    };
    return t.addEventListener(e, i), r[n(441)] = () => {
      t.removeEventListener(e, i);
    }, r;
  }
  static of(...t) {
    const e = Se;
    let n, r = new Be();
    return r[e(447)] = function(i) {
      return this.observers.push(i), n = setTimeout(() => {
        t[oe(442)]((o) => r.publish(o));
      }, 10), this;
    }, r[e(441)] = () => {
      clearTimeout(n);
    }, r;
  }
}
const ye = lo;
function lo(s, t) {
  const e = co();
  return (lo = function(n, r) {
    return e[n -= 263];
  })(s, t);
}
(function() {
  const s = lo, t = co();
  for (; ; )
    try {
      if (parseInt(s(298)) / 1 + -parseInt(s(295)) / 2 * (parseInt(s(287)) / 3) + parseInt(s(288)) / 4 * (parseInt(s(264)) / 5) + parseInt(s(278)) / 6 * (-parseInt(s(269)) / 7) + parseInt(s(301)) / 8 * (parseInt(s(294)) / 9) + parseInt(s(292)) / 10 + -parseInt(s(270)) / 11 === 566645)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class We {
  static [ye(274)](t, e, n) {
    const r = ye;
    let i = t.attachEvent || t.addEventListener;
    je[r(302)]() && e == "mousewheel" ? e = "DOMMouseScroll" : window[r(279)] && e.substring(0, 2) !== "on" && (e = "on" + e), i[r(296)](t, e, n);
  }
  static [ye(268)](t, e) {
    const n = ye;
    if (typeof t == n(293)) {
      let r = document[n(265)](n(303));
      r[n(272)] = "muted", r.style[n(267)] = "none";
      let i = document[n(265)]("source");
      return i[n(266)]("_source", "jtopo"), i[n(284)] = "video/mp4", i.src = t, r[n(275)](i), document.body.appendChild(r), r.oncanplay = function() {
        e(r);
      }, r;
    }
    return t;
  }
  static [ye(297)](t) {
    const e = ye;
    let n = e(277)[e(283)](",");
    if (t.fullScreen == 1) {
      let r = t._backup;
      n.forEach((i) => {
        t[e(285)][i] = r[i];
      }), t.fullScreen = !1;
    } else {
      let r = {};
      n.forEach((i) => {
        r[i] = t.style[i];
      }), t[e(276)] = r, t.style.position = "fixed", t[e(285)][e(289)] = 0, t.style.top = 0, t.style[e(300)] = 0, t.style.right = 0, t.style.zIndex = Hs.FullWindowDom, t.fullScreen = !0;
    }
  }
  static fullScreen(t) {
    const e = ye;
    t.requestFullscreen ? t.requestFullscreen() : t[e(263)] ? t.mozRequestFullScreen() : t.webkitRequestFullscreen ? t[e(280)]() : t.msRequestFullscreen && t.msRequestFullscreen();
  }
}
function co() {
  const s = ["setAttribute", "display", "createVideo", "4183186vfOSwN", "372306sXLcUy", "body", "muted", "getBoundingClientRect", "addEventListener", "appendChild", "_backup", "position,width,height,left,top,bottom,right,zIndex", "6cWxXgs", "attachEvent", "webkitRequestFullscreen", "clientLeft", "ontouchstart", "split", "type", "style", "clientY", "54IqseJK", "7244kNUSzh", "left", "touches", "maxTouchPoints", "5053990MpyosQ", "string", "2247849OjxxvZ", "57458QwHAyc", "call", "fullWindow", "262973jsfTFn", "offsetParent", "bottom", "16UzaMfo", "isFirefox", "video", "offsetLeft", "mozRequestFullScreen", "1235XxLlaJ", "createElement"];
  return (co = function() {
    return s;
  })();
}
We.isMobileDevice = ye(282) in window || navigator[ye(291)] > 0;
const Pe = uo;
function uo(s, t) {
  const e = po();
  return (uo = function(n, r) {
    return e[n -= 205];
  })(s, t);
}
(function() {
  const s = uo, t = po();
  for (; ; )
    try {
      if (-parseInt(s(216)) / 1 + -parseInt(s(208)) / 2 + -parseInt(s(205)) / 3 * (parseInt(s(219)) / 4) + -parseInt(s(210)) / 5 * (-parseInt(s(222)) / 6) + -parseInt(s(215)) / 7 + parseInt(s(223)) / 8 + parseInt(s(214)) / 9 * (parseInt(s(206)) / 10) === 587672)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ml {
  constructor() {
    this.zomThreshold = 10, this.touchsCount = 0, this.lastTouchDistance = null, this.lastTouchCenter = null;
  }
  [Pe(212)](t, e) {
    const n = Pe;
    this.touchsCount = t[n(218)].length, t.type == "touchmove" ? this.touchmoveHandler(t, e.getCurrentLayer(), e) : t.type == "touchstart" ? this.touchStartHandler(t) : t.type == "touchend" && this.touchendHandler(t);
  }
  touchStartHandler(t) {
    const e = Pe;
    t[e(218)].length === 2 && (this.lastTouchDistance = this.getDistance(t[e(218)]), this.lastTouchCenter = this[e(213)](t.touches));
  }
  touchmoveHandler(t, e, n) {
    const r = Pe;
    if (t[r(221)](), t.touches.length !== 2 || this.lastTouchDistance == null || this.lastTouchCenter == null)
      return;
    const i = n.handlerLayer.render[r(207)].getBoundingClientRect(), o = i.left, a = i.top, h = this[r(225)](t.touches), l = this[r(213)](t[r(218)]);
    if (Math.abs(h - this.lastTouchDistance) >= this.zomThreshold) {
      const c = h / this.lastTouchDistance, u = t[r(218)][0], d = t[r(218)][1];
      let f = n.camera.toWorldXY(0.5 * (d[r(220)] - o + (u.clientX - o)), 0.5 * (d[r(211)] - a + (u.clientY - a)));
      n.camera.zoomBy(c, f.x, f.y);
    } else {
      let c = l.x - this[r(217)].x, u = l.y - this[r(217)].y;
      n.camera._dragWith(c / n.camera.scale, u / n.camera[r(224)]);
    }
    this.lastTouchDistance = h, this.lastTouchCenter = l;
  }
  touchendHandler(t) {
    const e = Pe;
    t.touches.length <= 2 && (this[e(209)] = null, this.lastTouchCenter = null);
  }
  [Pe(225)](t) {
    return Math.hypot(t[1].clientX - t[0].clientX, t[1].clientY - t[0].clientY);
  }
  [Pe(213)](t) {
    const e = Pe;
    return { x: 0.5 * (t[0][e(220)] + t[1][e(220)]), y: 0.5 * (t[0].clientY + t[1].clientY) };
  }
}
function po() {
  const s = ["291nCVPfP", "130scDeTN", "canvas", "1624970okfwAp", "lastTouchDistance", "945690aitvZi", "clientY", "onTouch", "getCenter", "820449mRDtif", "6376580peJfNd", "226387swAMVZ", "lastTouchCenter", "touches", "19780Qlqibl", "clientX", "preventDefault", "36CaSMWn", "5577824HYhEpu", "scale", "getDistance"];
  return (po = function() {
    return s;
  })();
}
const st = fo;
function fo(s, t) {
  const e = go();
  return (fo = function(n, r) {
    return e[n -= 177];
  })(s, t);
}
(function() {
  const s = fo, t = go();
  for (; ; )
    try {
      if (-parseInt(s(230)) / 1 + -parseInt(s(242)) / 2 * (-parseInt(s(197)) / 3) + parseInt(s(189)) / 4 * (-parseInt(s(217)) / 5) + -parseInt(s(232)) / 6 + -parseInt(s(201)) / 7 + -parseInt(s(246)) / 8 * (-parseInt(s(236)) / 9) + -parseInt(s(240)) / 10 * (-parseInt(s(208)) / 11) === 392605)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Il = typeof TouchEvent < "u", xl = ["pointerdown", "pointerup", st(228), "pointerenter", "pointerout", "wheel", "click", "dblclick", st(244), st(224), st(199), st(209), "touchstart", "touchmove", "touchend"];
function go() {
  const s = ["timeStamp", "pointerdownHandler", "3162455bAlcpV", "cancelable", "subscribe", "publish", "updateBaseInfo", "previous", "dxInWorld", "dragend", "overview", "pointerDownX", "touchWheel", "pointermove", "isIdle", "685342ZprUUR", "idleTimeout", "42834FwKbbC", "editor", "unselectedHandler", "hasListener", "638541taGOpk", "selectedGroup", "pointerdown", "preventDefault", "20sbVuco", "camera", "2vgKomv", "mode", "dragstart", "pickObject", "72OZuVtf", "pointerenter", "isDragEnd", "isPointerDown", "button", "metaKey", "drag", "offsetY", "mouseoverTarget", "buttons", "addEventListener", "type", "event", "_setTarget", "4Dmwyoh", "canvas", "call", "filter", "clientY", "isRightButton", "render", "wheel", "1711242qAZEBf", "target", "dragover", "dyInWorld", "358428JRVubu", "scale", "_matrixDirty", "onTouch", "isDragStart", "preMouseoverTarget", "eventObservable", "3079043ZhbrYm", "drop", "stage", "isDraging", "isPointerOn", "_clearTarget", "yInWorld"];
  return (go = function() {
    return s;
  })();
}
class ph extends ve {
  constructor(t) {
    const e = st;
    super(), this.skipPointerMovePicking = !1, this[e(226)] = 0, this.pointerDownY = 0, this.x = -1, this.y = -1, this[e(178)] = !1, this[e(194)] = !1, this.isDragEnd = !1, this.isDraging = !1, this.isPointerOn = !1, this.isDragStart = !1, this[e(222)] = { type: "", x: 0, y: 0, dx: 0, dy: 0, xInWorld: 0, yInWorld: 0, dxInWorld: 0, dyInWorld: 0, isDraging: !1, isPointDown: !1, isPointerOn: !1, isDragStart: !1, isDragEnd: !1, timeStamp: 0 }, this[e(231)] = 50, this.buttons = 0, this[e(179)] = 0, this[e(227)] = new ml(), this.eventObservable = new Be(), this.stage = t, this.initEvents(), this._initObserve();
  }
  initEvents() {
    let t = this.stage, e = t.handlerLayer.render.canvas;
    xl.map(function(n) {
      We.addEventListener(e, n, function(r) {
        t.inputSystem._onEvent(r);
      });
    });
  }
  _initObserve() {
    const t = st, e = this, n = this.stage;
    e[t(207)][t(192)]((r) => {
      const i = t;
      if (n[i(243)] == Zt.view || n.camera.localView.mode == "painted")
        return !1;
      if (n[i(243)] == Zt[i(181)])
        return !0;
      if (e[i(206)] = e[i(183)], e.mouseoverTarget = null, r.type == i(238)) {
        if (n.handlerLayer._pickUp() == null) {
          let o = n._pickUpViewLayers();
          o == null ? e[i(213)]() : e[i(188)](o);
        }
        return !0;
      }
      if (r.type == "pointermove" && r.buttons <= 0) {
        let o = n._pickUpViewLayers();
        e.mouseoverTarget = o;
      }
      return !0;
    }).filter((r) => {
      const i = t;
      let o = r.type;
      if (n.mode == Zt.edit && n.editor != null) {
        let a = o + "Handler";
        if (n[i(233)][a] && (n.editor[a](r), r.defaultPrevented))
          return !1;
      }
      return !0;
    }).subscribe((r) => {
      const i = t;
      let o = r[i(186)] + "Handler";
      n[o] && n[o](r), n[i(225)] && (n.overview.dirty = !0);
    }), e[t(207)][t(219)]((r) => {
      const i = t;
      r.defaultPrevented || (e.dispatchEvent(r), r[i(186)] == "wheel" && r[i(239)]());
    });
  }
  [st(221)](t, e) {
    const n = st, r = this.previous;
    r.type = this.type, r.x = this.x, r.y = this.y, r.isDraging = this.isDraging, r.isPointDown = this[n(178)], r[n(212)] = this.isPointerOn, r[n(205)] = this[n(205)], r.isDragEnd = this.isDragEnd, r.timeStamp = this.timeStamp, r.dx = this.dx, r.dy = this.dy, r.xInWorld = this.xInWorld, r.yInWorld = this[n(214)], r.dxInWorld = this[n(223)], r.dyInWorld = this[n(200)], this[n(187)] = t, this.timeStamp = t[n(215)], this.type = e, this[n(177)] = !1, this.isIdle = !1;
    let i = this;
    this._idleTimer != null && window.clearTimeout(this._idleTimer), this._idleTimer = setTimeout(function() {
      i[n(229)] = !0;
    }, this[n(231)]);
  }
  _updatePointerInfo(t, e) {
    const n = st;
    this.updateBaseInfo(t, e), this.isPointerOn = e !== "pointerout" && t.offsetX > 0 && t[n(182)] > 0;
    const r = this.previous;
    this.buttons = t[n(184)], this[n(179)] = t.button, this.isRightButton = t.button == 2, this.x = t.offsetX, this.y = t.offsetY, e == n(238) ? (this.isPointerDown = !0, this.pointerDownX = this.x, this.pointerDownY = this.y) : (e == "pointerup" || e == "pointerout") && (this.isPointerDown = !1, r[n(186)] == "pointermove" && (this.isDragEnd = !0)), this[n(211)] = this.isPointerDown == 1 && (e == "pointermove" || e == n(196) || e == n(247) || e == "pointerout"), this[n(205)] = this[n(211)] && r.isDraging != 1, this.dx = this.x - r.x, this.dy = this.y - r.y;
    let i = this.stage[n(241)].toWorldXY(this.x, this.y);
    this.xInWorld = i.x, this.yInWorld = i.y, this.dxInWorld = this.dx / this.stage.camera[n(202)], this.dyInWorld = this.dy / this.stage.camera.scale;
  }
  _onEvent(t) {
    const e = st, n = t[e(186)];
    t instanceof PointerEvent && n !== "click" && !t.isPrimary || (Il && t instanceof TouchEvent ? this[e(227)][e(204)](t, this.stage) : (this.stage.handlerLayer[e(195)][e(190)].title = "", this._updatePointerInfo(t, n), this.eventObservable[e(220)](t)));
  }
  [st(245)](t) {
    const e = st, n = this[e(210)], r = this;
    let i = r[e(187)] || { type: e(238), ctrlKey: !1, metaKey: !1 };
    if (t == null)
      return;
    t[e(203)] = !0, r.type == "pointerdown" && t[e(216)][e(191)](t, r);
    const o = i.ctrlKey || i[e(180)];
    n.selectedGroup.has(t) ? o && n.selectedGroup.remove(t) : (!o && n.selectedGroup.removeAll(), n[e(237)].add(t));
  }
  _setTarget(t) {
    const e = st;
    this.preTarget = this[e(198)], this.target = t;
  }
  _clearTarget() {
    const t = st;
    this.target != null && this[t(198)][t(234)](), this[t(198)] = null;
  }
  _mouseEventForwardToCanvas(t) {
    let e = this.event;
    e instanceof PointerEvent && t.dispatchEvent(function(n, r, i) {
      const o = st, a = new MouseEvent(n[o(186)], { view: n.view, bubbles: !0, cancelable: n[o(218)], clientX: n.clientX, clientY: n[o(193)] });
      return r == null && (r = n.offsetX), i == null && (i = n[o(182)]), Object.defineProperty(a, "offsetX", { get: function() {
        return r;
      } }), Object.defineProperty(a, "offsetY", { get: function() {
        return i;
      } }), a;
    }(e));
  }
  preventDefault() {
    const t = st;
    this.event && this.event[t(239)]();
  }
  addEventListener(t, e) {
    return super[st(185)](t, e);
  }
  [st(235)](t) {
    return super.hasListener(t);
  }
}
let Bn;
function Mr(s) {
  const t = $s;
  let e = new KeyboardEvent(s.type, s), n = e.preventDefault;
  if (e[t(344)] = function() {
    const r = t;
    s[r(344)](), n[r(347)](this);
  }, e.previous = Bn, Bn) {
    const r = s[t(345)] == Bn.key;
    let i = e[t(341)] - Bn.time;
    r && i < 400 && (e[t(351)] = !0);
  }
  return Bn = e, e;
}
function yo() {
  const s = ["534657GOgOHl", "2SmfMrr", "time", "raw", "812345KkWXHq", "preventDefault", "key", "2094828Cajzjr", "call", "2909457xgOGhI", "240319ODUeYY", "8JpuwDO", "isDouble", "996948ayGagy", "124376WgREJk"];
  return (yo = function() {
    return s;
  })();
}
function bl(s, t) {
  const e = $s;
  let n = {};
  t instanceof WheelEvent ? n = new WheelEvent(s, t) : window.DragEvent && t instanceof window.DragEvent ? n = new DragEvent(s, t) : t instanceof MouseEvent ? n = new MouseEvent(s, t) : t instanceof TouchEvent && (n = new TouchEvent(s, t));
  let r = n.preventDefault;
  return n.preventDefault = function() {
    t.preventDefault(), r.call(this);
  }, n[e(342)] = t, n;
}
function $s(s, t) {
  const e = yo();
  return ($s = function(n, r) {
    return e[n -= 340];
  })(s, t);
}
(function() {
  const s = $s, t = yo();
  for (; ; )
    try {
      if (parseInt(s(349)) / 1 + parseInt(s(340)) / 2 * (parseInt(s(354)) / 3) + parseInt(s(352)) / 4 + parseInt(s(343)) / 5 + -parseInt(s(346)) / 6 + parseInt(s(353)) / 7 + -parseInt(s(350)) / 8 * (parseInt(s(348)) / 9) === 175601)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let wl = class {
  constructor(s) {
    this.type = s;
  }
};
const _t = qt;
function mo() {
  const s = ["push", "keyMap", "hasListener", "4005260kWWgJr", "stage", "addEventListener", "10939956bwDFZF", "debug", "dispatchEvent", "map", "sendKey", "keyupHandler", "control", "keyupOb", "split", "3wvnvcp", "toLowerCase", "textInputMode", "20KtYxGU", "set", "get", "ctrlKey", "bufferCount", "activeElement", "alt", "1708102wBeLcH", "426792GYlxJe", "getKeyBinding", "25iqxlWl", "join", "keydown", "fromEvent", "329679AWpfBj", "preventDefault", "removeEventListener", "keydownOb", "isKeydown", "subscribe", "disabled", "sort", "INPUT", "59sOTovw", "144XZyOSw", "init", "7122sIluce", "Shift", "regMap", "1634772TQOOzL"];
  return (mo = function() {
    return s;
  })();
}
function qt(s, t) {
  const e = mo();
  return (qt = function(n, r) {
    return e[n -= 437];
  })(s, t);
}
(function() {
  const s = qt, t = mo();
  for (; ; )
    try {
      if (-parseInt(s(467)) / 1 * (parseInt(s(470)) / 2) + parseInt(s(441)) / 3 * (-parseInt(s(473)) / 4) + -parseInt(s(454)) / 5 * (parseInt(s(452)) / 6) + -parseInt(s(477)) / 7 + -parseInt(s(468)) / 8 * (-parseInt(s(458)) / 9) + parseInt(s(444)) / 10 * (parseInt(s(451)) / 11) + parseInt(s(480)) / 12 === 334953)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class dh extends ve {
  constructor(t) {
    const e = qt;
    super(), this[e(481)] = !1, this.disabled = !1, this.regMap = /* @__PURE__ */ new Map(), this[e(475)] = /* @__PURE__ */ new Map(), this[e(478)] = t, this.init(), this.debug = !1;
  }
  disable() {
    this[qt(464)] = !0;
  }
  enable() {
    this.disabled = !1;
  }
  isControlDown() {
    return this.isKeydown("Control");
  }
  isShiftDown() {
    const t = qt;
    return this.isKeydown(t(471));
  }
  isAltDown() {
    return this.isKeydown("Alt");
  }
  isMetaDown() {
    return this[qt(462)]("Meta");
  }
  bindKey(t, e) {
    const n = qt;
    let r = t.toLowerCase()[n(440)]("+").sort().join("+");
    this[n(472)].set(r, e);
  }
  isKeyRegistered(t) {
    return this[qt(453)](t) != null;
  }
  getKeyBinding(t) {
    const e = qt;
    let n = t.toLowerCase().split("+")[e(465)]().join("+");
    return this.regMap.get(n);
  }
  unbind(t) {
    const e = qt;
    let n = t.toLowerCase().split("+").sort()[e(455)]("+");
    this.regMap.delete(n);
  }
  [_t(462)](t) {
    const e = _t;
    return this.keyMap[e(446)](t.toLowerCase());
  }
  [_t(484)](t, e) {
    const n = _t;
    e == null && ((e = new KeyboardEvent(n(456))).mock = !0), this.fireKey(t[n(442)]().split("+"), e, !0);
  }
  checkValid() {
    const t = _t;
    let e = document[t(449)].tagName;
    return !this[t(464)] && e != t(466) && e != "TEXTAREA";
  }
  fireKey(t, e, n) {
    const r = _t;
    if (n == 0)
      return;
    const i = this;
    let o = this.stage.editor, a = t.sort().join("+")[r(442)]();
    this.debug && console.log("按下", a);
    let h = this.regMap.keys();
    for (let l of h) {
      if (l != a || o != null && o[r(443)] == 1)
        continue;
      e[r(459)]();
      let c = i.regMap.get(l);
      c && c(e);
    }
  }
  keydownHandler(t) {
    const e = _t;
    let n = t.key.toLowerCase(), r = this.stage, i = [];
    t[e(447)] && (this.keyMap.set(e(438), !0), i[e(474)]("control")), t.altKey && (this[e(475)].set(e(450), !0), i.push("alt")), t.shiftKey && (this[e(475)][e(445)]("shift", !0), i.push("shift")), t.metaKey && (this.keyMap.set("meta", !0), i.push("meta")), i.indexOf(n) == -1 && i[e(474)](n), this.keyMap.set(n, !0);
    let o = Mr(t);
    this.fireKey(i, o, r.inputSystem.isPointerOn), this.dispatchEvent(o);
  }
  keyupHandler(t) {
    const e = _t, n = this, r = t.key.toLowerCase();
    n.keyMap.delete(r);
    let i = n.stage.editor;
    if (i != null && i.textInputMode == 1)
      return;
    let o = Mr(t);
    n[e(482)](o);
  }
  [_t(469)]() {
    const t = _t;
    let e = this, n = Be[t(457)](document, "keydown"), r = Be.fromEvent(document, "keyup"), i = n.filter(() => this.checkValid()), o = r.filter(() => this.checkValid());
    i[t(463)]((a) => {
      e.keydownHandler(a);
    }), o.subscribe((a) => {
      e[t(437)](a);
    }), this[t(461)] = i, this[t(439)] = o, this.keyBufferOb = i[t(483)]((a) => a.key)[t(448)](2, 1).map((a) => a[0] + "" + a[1]);
  }
  [_t(479)](t, e) {
    return super[_t(479)](t, e);
  }
  [_t(460)](t, e) {
    return super.removeEventListener(t, e);
  }
  hasListener(t) {
    return super[_t(476)](t);
  }
}
const et = ts;
function ts(s, t) {
  const e = Io();
  return (ts = function(n, r) {
    return e[n -= 235];
  })(s, t);
}
(function() {
  const s = ts, t = Io();
  for (; ; )
    try {
      if (-parseInt(s(251)) / 1 * (parseInt(s(264)) / 2) + -parseInt(s(260)) / 3 * (parseInt(s(259)) / 4) + parseInt(s(266)) / 5 + -parseInt(s(274)) / 6 + -parseInt(s(265)) / 7 + parseInt(s(254)) / 8 * (-parseInt(s(271)) / 9) + parseInt(s(253)) / 10 === 541804)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ls {
  static _getTopFrozenParent(t) {
    let e = ls[ts(272)](t);
    for (let n = 0; n < e.length; n++)
      if (e[n].frozen)
        return e[n];
    return null;
  }
  static _getAncestors(t) {
    const e = ts;
    if (t.parent == null)
      return [];
    let n = [];
    for (; t.parent != null; )
      n.push(t.parent), t = t[e(241)];
    return n[e(238)]();
  }
  static [et(247)](t, e) {
    const n = et;
    let r = t._shape[n(269)](e);
    if (r == null)
      throw Error("anchor not exist:" + e);
    return N.calcPointByAnchor(t, r);
  }
  static getNearestPoint(t, e) {
    const n = et;
    if (t instanceof E) {
      if (t[n(245)].hasBorder)
        return Ht.getNearestPointOnLines(e.x, e.y, t[n(244)][n(263)], t._shape.isClosed);
      if (t._obb[n(263)] == null && t._matrixDirty)
        throw new Error(n(252));
    }
    return t._shape.getIntersect(e.x, e.y, t);
  }
  static unlinks(t, e) {
    const n = et;
    if (t instanceof z)
      return void t[n(250)]();
    let r = t.inLinks;
    r != null && (r.forEach((o) => {
      o.parent != null && (e != null && e.indexOf(o) != -1 || o.setEnd(o.getEndPoint()));
    }), t.inLinks.length = 0);
    let i = t[n(237)];
    i != null && (i[n(243)]((o) => {
      const a = n;
      o.parent != null && (e != null && e.indexOf(o) != -1 || o[a(262)](o.getBeginPoint()));
    }), t.outLinks.length = 0);
  }
  static [et(249)](t) {
    const e = et;
    if (t.parent == null)
      return !1;
    const n = t.parent.children, r = n[e(261)](t);
    if (r === n[e(248)] - 1)
      return !1;
    const i = n[r], o = n[r + 1];
    return n[r] = o, n[r + 1] = i, t.ownerLayer && (t.ownerLayer._treeDirty = !0), !0;
  }
  static swapWithLeft(t) {
    const e = et;
    if (t.parent == null)
      return !1;
    const n = t[e(241)][e(255)], r = n[e(261)](t);
    if (r === 0)
      return !1;
    const i = n[r], o = n[r - 1];
    return n[r] = o, n[r - 1] = i, t.ownerLayer && (t[e(235)]._treeDirty = !0), !0;
  }
  static [et(239)](t) {
    const e = et;
    if (t.parent == null)
      return !1;
    const n = t.parent.children, r = n.indexOf(t);
    if (r === n[e(248)] - 1)
      return !1;
    const i = n[r];
    for (let o = r; o < n.length - 1; o++)
      n[o] = n[o + 1];
    return n[n.length - 1] = i, t.ownerLayer && (t.ownerLayer._treeDirty = !0), !0;
  }
  static moveToHead(t) {
    const e = et;
    if (t.parent == null)
      return !1;
    const n = t.parent.children, r = n.indexOf(t);
    if (r === 0)
      return !1;
    const i = n[r];
    for (let o = r; o > 0; o--)
      n[o] = n[o - 1];
    return n[0] = i, t[e(235)] && (t.ownerLayer._treeDirty = !0), !0;
  }
}
function Io() {
  const s = ["cos", "1394538mlSGfJ", "ownerLayer", "getUnionRect", "outLinks", "reverse", "moveToTail", "getRect", "parent", "width", "forEach", "_obb", "_drawContentDesc", "getLinks", "anchorToLocalPoint", "length", "swapWithRight", "unlink", "752qxZHeT", "未来得及更新矩阵", "26222540dLlBKv", "1050352yzXhiB", "children", "getCenter", "filter", "travel", "8BwLSFH", "803325OYPNDl", "indexOf", "setBegin", "points", "2564EgROgo", "5159441ahBUfZ", "3256190keodGv", "_upgradeParent", "height", "getConnectionAnchor", "rotation", "18nXJyGS", "_getAncestors"];
  return (Io = function() {
    return s;
  })();
}
class ce {
  static resizeByFixedPoint(t, e, n, r) {
    const i = et;
    let o = t._positionToLocalPoint(e);
    t[i(242)] = n, t.height = r;
    let a = t._positionToLocalPoint(e);
    return t.x -= a.x - o.x, t.y -= a.y - o.y, t;
  }
  static rotateAround(t, e, n, r, i) {
    const o = et;
    return t.x = e + Math[o(273)](i) * r, t.y = n + Math.sin(i) * r, t[o(270)] = i, t;
  }
  static _upgradeLinks(t) {
    const e = et;
    return t[e(246)]()[e(257)]((n) => n[e(267)]() != null);
  }
  static [et(236)](t) {
    const e = et;
    let n = t[0][e(240)]();
    for (let r = 1; r < t[e(248)]; r++)
      n = O.union(n, t[r].getRect());
    return n;
  }
  static setXYButChildFixed(t, e, n) {
    const r = et;
    let i = t.children;
    t.x += e, t.y += n;
    for (let o = 0; o < i[r(248)]; o++) {
      const a = i[o];
      a instanceof E && (a.x -= e, a.y -= n);
    }
  }
  static sizeFitToChildren(t, e) {
    const n = et;
    let r = t.children;
    if (r.length == 0)
      return;
    let i = ce.getUnionRect(r);
    e == null && (e = 0);
    let o = 2 * e;
    t.resize(i.width + o, i.height + o);
    let a = i.x + t[n(242)] / 2, h = i.y + t[n(268)] / 2;
    ce.setXYButChildFixed(t, a - e, h - e);
  }
  static translateNodesCenterTo(t, e, n) {
    const r = et;
    let i = e, o = n, a = [];
    a = a.concat(t);
    let h = ce[r(236)](a)[r(256)](), l = i - h.x, c = o - h.y;
    a.forEach((u) => {
      u.translateWith(l, c);
    });
  }
  static [et(258)](t, e, n = null, r = null) {
    const i = et;
    if (r == null)
      r = [];
    else if (r.includes(t))
      return null;
    if (e && e(t, n), r.push(t), t instanceof E) {
      let o = t[i(237)];
      if (o != null)
        for (let a = 0; a < o[i(248)]; a++) {
          let h = o[a];
          ce.travel(h, e, t, r);
        }
    } else
      t instanceof z && t.end.isDisplayObjectHost() && ce.travel(t.end.host, e, n, r);
    return r;
  }
}
const ke = tr;
function tr(s, t) {
  const e = xo();
  return (tr = function(n, r) {
    return e[n -= 236];
  })(s, t);
}
function xo() {
  const s = ["resizeWith", "width", "height", "1315ijowEj", "89620SSMQIZ", "880206MZBIph", "assign", "length", "12eiuTyw", "297680FRxZIN", "rotateWith", "3240nXJIHx", "rotation", "objects", "doLayout", "scaleX", "880117ckTVca", "91641LOqeEK", "resize", "567909MzGxys"];
  return (xo = function() {
    return s;
  })();
}
(function() {
  const s = tr, t = xo();
  for (; ; )
    try {
      if (-parseInt(s(241)) / 1 + -parseInt(s(245)) / 2 * (-parseInt(s(254)) / 3) + -parseInt(s(248)) / 4 * (parseInt(s(240)) / 5) + parseInt(s(242)) / 6 + parseInt(s(253)) / 7 + parseInt(s(246)) / 8 + -parseInt(s(236)) / 9 === 127173)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Es {
  constructor(t, e) {
    const n = tr;
    this.x = 0, this.y = 0, this.scaleX = 1, this.scaleY = 1, this.width = 1, this.height = 1, this.rotation = 0, this.objects = t, this.positions = e, this.positionNormals = ht.normalizePoints(e);
    let r = ht.getBoundingBox(e);
    this.width = r.width, this[n(239)] = r[n(239)];
  }
  [ke(255)](t, e) {
    return this.width = t, this.height = e, this;
  }
  [ke(237)](t, e) {
    return this.width += t, this.height += e, this;
  }
  translate(t, e) {
    return this.x = t, this.y = e, this;
  }
  translateWith(t, e) {
    return this.x += t, this.y += e, this;
  }
  scale(t, e) {
    return this[ke(252)] = t, this.scaleY = e, this;
  }
  scaleBy(t, e) {
    this.scaleX *= t, this.scaleY *= e, this.resize;
  }
  rotate(t) {
    return this[ke(249)] = t, this;
  }
  [ke(247)](t) {
    return this.rotation += t, this;
  }
  updateXY(t) {
    const e = ke, n = this.objects;
    let r = Math.min(t.length, n[e(244)]);
    for (let i = 0; i < r; i++) {
      let o = t[i];
      n[i].setXY(o.x, o.y);
    }
  }
  [ke(251)](t) {
    const e = ke;
    let n = this, r = this[e(250)], i = this.positionNormals;
    if (i = i.map((o) => {
      const a = e;
      let h = { x: 0.5 * n[a(238)] * o.x * n[a(252)] + n.x, y: 0.5 * n[a(239)] * o.y * n.scaleY + n.y };
      return (this.rotation !== 0 || this.rotation % 6.283185307179586 != 0) && (h = C.rotate(h.x, h.y, n.x, n.y, this.rotation)), h;
    }), t != null) {
      let o = function(l) {
        return n.updateXY(l);
      }, a = r.map((l) => ({ x: l.x, y: l.y })), h = Object[e(243)]({ from: a, to: i, update: o }, t);
      this.animationSystem.anime(h).play();
    } else
      this.updateXY(i);
    return this;
  }
}
function bo() {
  const s = ["686182XhPSZE", "39429020IyBtxt", "3395754fKKsnv", "1095294PHqUUn", "sin", "16hRfVSm", "11998kgnrUV", "11XNIlan", "min", "translate", "3202430KaWJsL", "object", "30kMkuQD", "forEach", "length", "104CKrzFI", "2553648sgzCYa"];
  return (bo = function() {
    return s;
  })();
}
function wo(s, t) {
  const e = bo();
  return (wo = function(n, r) {
    return e[n -= 385];
  })(s, t);
}
function vo(s, t) {
  const e = _o();
  return (vo = function(n, r) {
    return e[n -= 477];
  })(s, t);
}
function _o() {
  const s = ["translate", "2830vNllNn", "forEach", "104NBoUtd", "3504LJadKL", "2771930UVhthZ", "height", "length", "158340NFXEVv", "10RZJWQH", "40927xirhnG", "1237476kFtjqp", "max", "2585439aItQyD", "39361fhxfKa", "root", "subtreeWidth", "11oMwaiF"];
  return (_o = function() {
    return s;
  })();
}
(function() {
  const s = wo, t = bo();
  for (; ; )
    try {
      if (-parseInt(s(397)) / 1 * (parseInt(s(389)) / 2) + -parseInt(s(394)) / 3 + -parseInt(s(390)) / 4 + -parseInt(s(401)) / 5 + -parseInt(s(386)) / 6 * (parseInt(s(391)) / 7) + parseInt(s(396)) / 8 * (-parseInt(s(393)) / 9) + parseInt(s(392)) / 10 * (parseInt(s(398)) / 11) === 430268)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), function() {
  const s = vo, t = _o();
  for (; ; )
    try {
      if (-parseInt(s(477)) / 1 * (-parseInt(s(494)) / 2) + parseInt(s(493)) / 3 + parseInt(s(478)) / 4 + -parseInt(s(486)) / 5 * (parseInt(s(489)) / 6) + -parseInt(s(481)) / 7 * (parseInt(s(488)) / 8) + parseInt(s(480)) / 9 + parseInt(s(490)) / 10 * (-parseInt(s(484)) / 11) === 173219)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
const bs = Po;
function So() {
  const s = ["1073544zijzPf", "sizeFitToChildren", "131553xOkIKc", "39436qrWItQ", "graphSystem", "575692HgplLY", "1lTqdrx", "1481802nvrFJV", "isTree", "filter", "5tTVxhF", "39261RNPxfE", "490zfhHAc", "animationSystem", "pointsLayout", "1365344JTfWxM"];
  return (So = function() {
    return s;
  })();
}
function Po(s, t) {
  const e = So();
  return (Po = function(n, r) {
    return e[n -= 213];
  })(s, t);
}
(function() {
  const s = Po, t = So();
  for (; ; )
    try {
      if (parseInt(s(217)) / 1 * (-parseInt(s(214)) / 2) + -parseInt(s(222)) / 3 + parseInt(s(216)) / 4 * (parseInt(s(221)) / 5) + -parseInt(s(227)) / 6 + -parseInt(s(218)) / 7 + -parseInt(s(226)) / 8 + parseInt(s(213)) / 9 * (parseInt(s(223)) / 10) === 266073)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class fh {
  constructor(t, e) {
    this.animationSystem = t, this.graphSystem = e;
  }
  [bs(225)](t, e) {
    let n = new Es(t, e);
    return n.animationSystem = this.animationSystem, n;
  }
  starLayout(t) {
    const e = bs;
    !t.isTree() && (t = Ln.createMinimalSpanningTree(t));
    let n = t.traverse(null).filter((a) => a instanceof xn), r = function(a) {
      const h = wo, l = a.root, c = 2 * Math.max(l[h(385)].width, l.object.height), u = Math.PI / 2;
      return function d(f, y = 0) {
        f.level = y, f.children.forEach((I) => {
          d(I, y + 1);
        });
      }(l), function d(f, y) {
        const I = h, x = y.get(f.level) || 0;
        y.set(f.level, x + 1), f.children[I(387)]((m) => {
          d(m, y);
        });
      }(l, /* @__PURE__ */ new Map()), function d(f, y, I, x) {
        const m = h, b = Math.pow(f.level, 1.5) * c;
        if (f.level === 0) {
          f.translate(0, 0);
          const _ = 2 * Math.PI / f.children.length;
          f.children[m(387)]((k, v) => {
            d(k, v * _, _);
          });
        } else {
          const _ = y + I / 2, k = Math.cos(_) * b, v = Math[m(395)](_) * b;
          if (f[m(400)](k, v), f.children.length > 0) {
            const A = Math[m(399)](I / f.children.length, u), W = _ - A * (f.children[m(388)] - 1) / 2;
            f.children[m(387)]((it, Et) => {
              d(it, W + Et * A, A);
            });
          }
        }
      }(l, 0, 2 * Math.PI), a.allVirtualNodes;
    }(this.graphSystem.toTree(t)), i = n.map((a) => a.object), o = new Es(i, r);
    return o[e(224)] = this.animationSystem, o;
  }
  treeLayout(t) {
    const e = bs;
    !t[e(219)]() && (t = Ln.createMinimalSpanningTree(t));
    let n = t.traverse(null)[e(220)]((a) => a instanceof xn), r = function(a) {
      const h = vo, l = Math[h(479)](a[h(482)].object.width, a.root.object[h(491)]), c = l / 2, u = l, d = l, f = c, y = a[h(482)];
      return function I(x) {
        const m = h;
        if (!x.subtreeWidth)
          if (x.children.length === 0)
            x[m(483)] = l;
          else {
            let b = 0;
            x.children[m(487)]((_) => {
              b += I(_);
            }), b += f * (x.children.length - 1), x[m(483)] = Math.max(b, l);
          }
        return x.subtreeWidth;
      }(y), function I(x, m) {
        const b = h;
        if (x.children.length === 0)
          return x[b(485)](m + c, x.y), m + l;
        let _ = m, k = 0;
        return x.children[b(487)]((v, A) => {
          _ = I(v, _), k += v.x, A < x.children.length - 1 && (_ += f);
        }), k /= x.children[b(492)], x.translate(k, x.y), _;
      }(y, 0), function I(x, m = 0) {
        x.level = m, x.y = m * (d + u), x.children.forEach((b) => {
          I(b, m + 1);
        });
      }(y), a.allVirtualNodes;
    }(this[e(215)].toTree(t)), i = n.map((a) => a.object), o = new Es(i, r);
    return o.animationSystem = this[e(224)], o;
  }
  travelTree(t, e) {
    if (!t.isTree())
      throw new Error("graph is not a tree");
    return e == null && (e = t.vertexes[0]), t.travelNext(e);
  }
  sizeFitToChildren(t, e) {
    return ce[bs(228)](t, e);
  }
}
const Ne = er;
function er(s, t) {
  const e = Lo();
  return (er = function(n, r) {
    return e[n -= 175];
  })(s, t);
}
(function() {
  const s = er, t = Lo();
  for (; ; )
    try {
      if (parseInt(s(202)) / 1 * (parseInt(s(177)) / 2) + -parseInt(s(191)) / 3 * (parseInt(s(205)) / 4) + parseInt(s(190)) / 5 + parseInt(s(183)) / 6 + parseInt(s(182)) / 7 + -parseInt(s(178)) / 8 * (-parseInt(s(193)) / 9) + -parseInt(s(201)) / 10 === 776402)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ko {
  constructor(t) {
    const e = er;
    if (this.DefaultConfig = { fillStyle: "black", strokeStyle: "black", font: ze.DefaultFont }, this[e(206)] = { border: "1px rgba(0,0,0,0.5)", fillStyle: e(186) }, this[e(196)] = { borderWidth: 0, shadowColor: "rgba(128,128,128,0.8)", shadowBlur: 5, shadowOffsetX: 3, shadowOffsetY: 3 }, this.LinkSelectedStyle = { shadowColor: "rgba(128,128,128,0.9)", shadowBlur: 5, shadowOffsetX: 3, shadowOffsetY: 3 }, this["Link.Arrow"] = { lineWidth: 1 }, this[e(175)] = { textPosition: Wt.center, textBaseline: Dt.middle, textAlign: At.center, lineWidth: 0 }, this.Node = { textPosition: Wt.cb, textAlign: At.center, textBaseline: Dt.top, lineWidth: 1 }, this[e(204)] = { textPosition: Wt.cb, textAlign: At[e(207)], textBaseline: Dt.top, lineWidth: 1 }, this[e(179)] = { textPosition: Wt.cb, textAlign: At[e(207)], textBaseline: Dt[e(181)], lineWidth: 1 }, this.TextNode = { textPosition: Wt.center, textAlign: At.center, textBaseline: Dt.middle, lineWidth: 0 }, this.EllipseNode = { textPosition: Wt.cb, textAlign: At.center, textBaseline: Dt.top, lineWidth: 1 }, this[e(192)] = { textPosition: Wt.ct, textAlign: At.center, textBaseline: Dt.top, lineWidth: 1 }, this[e(198)] = { textPosition: Wt.cb, textAlign: At[e(207)], textBaseline: Dt.top, lineWidth: 1 }, this.VideoNode = { textPosition: Wt.cb, textAlign: At.center, textBaseline: Dt.top }, this.HtmlNode = { textPosition: Wt.cb, textAlign: At.center, textBaseline: Dt[e(181)] }, this[e(176)] = { textPosition: Wt.center, textAlign: At.center, textBaseline: Dt[e(200)] }, this.Link = { lineWidth: 1 }, this[e(203)] = { lineWidth: 1 }, this.QuadBezierLink = { lineWidth: 1 }, this.AutoFoldLink = { lineWidth: 1 }, this[e(189)] = { lineWidth: 1 }, this.ArcLink = { lineWidth: 1 }, this[e(184)] = { lineWidth: 1 }, t == null)
      return;
    let n = Object[e(194)](t);
    for (let r = 0; r < n.length; r++) {
      let i = n[r];
      Object.assign(this[i], t[i]);
    }
  }
  [Ne(180)]() {
    let t = {}, e = Object[Ne(194)](this);
    for (let n = 0; n < e.length; n++) {
      let r = e[n], i = vl[r], o = this[r], a = je.diff(o, i);
      a != null && (t[r] = a);
    }
    return t;
  }
}
const vl = new ko();
class An {
  constructor(t, e) {
    this[Ne(187)] = t, this.content = new ko(e);
  }
  copy(t) {
    let e = JSON.parse(JSON.stringify(this.content));
    return new An(t, e);
  }
  [Ne(197)](t, e) {
    const n = Ne;
    let r = this.content[t];
    if (r == null)
      throw new Error("setStyle: className not exist: " + t);
    Object[n(188)](r, e);
  }
  getStyle(t) {
    return this[Ne(185)][t];
  }
}
let Vn = new An(ze[Ne(195)], { DefaultConfig: { fillStyle: "rgba(0,0,0,0)", strokeStyle: "black", font: ze.DefaultFont }, SelectArea: { border: "1px solid rgba(0,0,0,0.5)", backgroundColor: "rgba(0,0,236,0.1)" } });
const zt = "#e0e0e0";
function Lo() {
  const s = ["34221690VAvCZG", "37WeCePW", "FoldLink", "ImageNode", "471824xxmWAD", "SelectArea", "center", "Link.Label", "RatioNode", "22226LrvZJc", "5993560AeetFv", "CanvasNode", "toJSON", "top", "6240143iWJfIk", "3018360sRBfgi", "ZShapeLink", "content", "rgba(0,0,236,0.1)", "name", "assign", "BezierLink", "6831575UqCjNh", "12widDtZ", "TipNode", "18WweQOs", "keys", "DefaultLightName", "NodeSelectedStyle", "setStyle", "ShapeNode", "DefaultFont", "middle"];
  return (Lo = function() {
    return s;
  })();
}
let Br = new An(ze.DefaultDarkName, { DefaultConfig: { fillStyle: "rgba(0,0,0,0)", strokeStyle: zt, font: ze[Ne(199)] }, SelectArea: { border: "1px solid rgba(255,255,255,0.5)", backgroundColor: "rgba(255,255,255,0.2)", lineWidth: 0 }, "Link.Label": { color: zt }, Node: { color: zt, lineWidth: 1 }, CanvasNode: { color: zt, lineWidth: 1 }, ImageNode: { color: zt, lineWidth: 1 }, TextNode: { color: zt }, TipNode: { color: zt }, ShapeNode: { color: zt }, EllipseNode: { color: zt, lineWidth: 1 }, VideoNode: { color: zt }, RatioNode: { color: zt }, HtmlNode: { color: zt } });
const re = nr;
function Oo() {
  const s = ["CustomStyle", "13wTAyfF", "583468JdBFge", "Link.Arrow", "stringify", "getTheme", "161sDhyNT", "viewLayers", "11043UNOYil", "stage", "529810zkRApJ", "themes", "toJSON", "6umGPUm", "length", "addTheme", "currentTheme", "165gwyBpE", "_computedStyle", "319122xEaMhm", "45xpopuU", "removeClass", "getStyle", "update", "Node", "DefaultLight", "name", "DefaultDark", "785877Frsfks", "9139884nqUwgQ", "fromJSON", "11096NNoHsN", "startsWith", "parent", "defStyles", "getClass", "getChangedProps", "assign", "725567YvrtTE", "rgb(255,255,255)"];
  return (Oo = function() {
    return s;
  })();
}
function nr(s, t) {
  const e = Oo();
  return (nr = function(n, r) {
    return e[n -= 384];
  })(s, t);
}
(function() {
  const s = nr, t = Oo();
  for (; ; )
    try {
      if (-parseInt(s(400)) / 1 + -parseInt(s(415)) / 2 * (-parseInt(s(390)) / 3) + parseInt(s(404)) / 4 * (parseInt(s(422)) / 5) + -parseInt(s(421)) / 6 * (-parseInt(s(408)) / 7) + parseInt(s(393)) / 8 * (-parseInt(s(410)) / 9) + parseInt(s(412)) / 10 * (-parseInt(s(419)) / 11) + -parseInt(s(391)) / 12 * (-parseInt(s(403)) / 13) === 861507)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class gh {
  constructor(t) {
    const e = nr;
    this.themes = {}, this[e(396)] = {}, this[e(411)] = t, this[e(417)](Vn), this.addTheme(Br), this.setTheme(Vn.name);
  }
  [re(417)](t) {
    this.themes[t.name] = t;
  }
  [re(407)](t) {
    return this.themes[t];
  }
  customStyleToJSON(t) {
    const e = re;
    let n = JSON.parse(JSON[e(406)](this[e(413)]));
    delete n[e(387)], delete n[e(389)];
    let r = {}, i = { themeName: this.currentTheme[e(388)], themes: n, styles: r }, o = Object.keys(this.defStyles);
    for (let a = 0; a < o[e(416)]; a++) {
      let h = o[a], l = this.defStyles[h][e(414)](t);
      r[h] = l;
    }
    return i;
  }
  fromJson(t) {
    const e = re;
    let n = t[e(402)];
    if (n == null)
      return;
    let r = n[e(413)], i = n.styles || {};
    if (r != null) {
      let h = Object.keys(r);
      for (let l = 0; l < h[e(416)]; l++) {
        let c = h[l], u = r[c], d = new An(c, u.content);
        this.addTheme(d);
      }
    }
    let o = t.Resources || [];
    this.defStyles = {};
    let a = Object.keys(i).filter((h) => h[e(394)]("."));
    for (let h = 0; h < a.length; h++) {
      let l = a[h], c = i[l];
      this[e(396)][l] = Ut[e(392)](c, o);
    }
    n.themeName != null && this.setTheme(n.themeName);
  }
  defClass(t, e) {
    if (e instanceof Ut)
      return void (this.defStyles[t] = e);
    let n = new Ut();
    Object.assign(n, e), this.defStyles[t] = n, !t.startsWith(".") && this.markDirty();
  }
  [re(423)](t) {
    delete this[re(396)][t], !t.startsWith(".") && this.markDirty();
  }
  [re(397)](t) {
    return this.defStyles[t];
  }
  markDirty() {
    const t = re;
    this.stage[t(409)].forEach((e) => {
      e._markAllDirty();
    });
  }
  start() {
    this.setTheme(this.currentTheme.name);
  }
  setTheme(t) {
    const e = re;
    let n = this[e(407)](t);
    if (n == null)
      throw new Error("theme not exist.");
    this[e(418)] = n, this.markDirty(), We.isMobileDevice && this.stage[e(409)].length === 1 && (n === Br ? this[e(411)].layersContainer.style.backgroundColor = e(401) : n === Vn && (this.stage.layersContainer.style.backgroundColor = "rgb(36,36,36)")), this.stage[e(385)]();
  }
  computeStyle(t) {
    const e = re;
    let n = this, r = {}, i = this.currentTheme, o = t.className;
    t.parent instanceof z && (t === t.parent.label ? o = "Link.Label" : (t === t.parent.beginArrow || t === t[e(395)].endArrow) && (o = e(405)));
    let a = i.getStyle(o);
    a == null && (t instanceof E ? a = i[e(384)](e(386)) : t instanceof z && (a = i[e(384)]("Link"))), a != null && Object.assign(r, a);
    let h = n.getClass(o);
    h != null && Object.assign(r, h);
    let l = t.classList;
    if (l.length > 0)
      for (let u = 0; u < l.length; u++) {
        const d = l[u];
        let f = n[e(397)](d);
        f != null && Object.assign(r, f);
      }
    let c = t.style[e(398)]();
    return Object[e(399)](r, c), t[e(420)][e(385)](r), t._afterStyleComputed(), t._computedStyle;
  }
  defTheme(t, e) {
    let n = this.getTheme(e);
    if (n == null)
      throw new Error("theme not exist:" + e);
    let r = n.copy(t);
    return this.addTheme(r), r;
  }
}
const Nt = wn;
function To() {
  const s = ["file reader error:", "521244IbWLao", "ctx", "146SPNlBq", "length", "batchLoadAndConvertImages", "all", "9976bMMQXZ", "2192468PEYAkd", "toDataURL", "7960sEMMeq", "svgToImageUrl", "putImageData", "url(", "8589996NIpSRS", `;stroke-width:1;'/>
<g style='stroke:`, "getContext", "230CVkTFk", "5ZCfFmu", "data:image/", "<path d='", "canvasColorFilter", "width", "result", "src", "canvas", "data:image/svg+xml;base64,", "data", "5140230bBcEVF", "drawImage", "; stroke-width:0.5;'>", "'/>", "3605tutQfl", "HTTP error! status: ", "height", "</g></svg>", "loadAndConvertImage", "bgGrid", `' xmlns='http://www.w3.org/2000/svg'>
<rect x='0' y='0' width='`, "getImageData", "203203pUdEGi"];
  return (To = function() {
    return s;
  })();
}
function wn(s, t) {
  const e = To();
  return (wn = function(n, r) {
    return e[n -= 417];
  })(s, t);
}
(function() {
  const s = wn, t = To();
  for (; ; )
    try {
      if (parseInt(s(435)) / 1 * (parseInt(s(439)) / 2) + parseInt(s(433)) / 3 + parseInt(s(440)) / 4 * (parseInt(s(450)) / 5) + -parseInt(s(419)) / 6 + parseInt(s(423)) / 7 * (parseInt(s(442)) / 8) + -parseInt(s(446)) / 9 + -parseInt(s(449)) / 10 * (-parseInt(s(431)) / 11) === 576268)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const za = document.createElement(Nt(457)), zr = class Ft {
  static bgGrid(t, e, n, r, i = "#242424", o = "#151515") {
    const a = Nt;
    let h = "<svg width='" + t + "' height='" + e + a(429) + t + "' height='" + e + "' style='fill:" + i + ";stroke:" + o + a(447) + o + a(421), l = e / n, c = t / r, u = "";
    for (let f = 1; f <= n; f++)
      u += "M 0 " + l * f + " H " + t + " ";
    h += a(452) + u + a(422);
    let d = "";
    for (let f = 1; f <= r; f++)
      d += "M " + c * f + " 0 V " + e + " ";
    return h += "<path d='" + d + a(422), h += a(426), h = h.replace(/\n/g, ""), h;
  }
  static createGridImage(t, e, n, r, i, o) {
    let a = Ft[Nt(428)](t, e, n, r, i, o);
    return 'url("' + Ft.svgToImageUrl(a) + '")';
  }
  static createLightGridImg(t, e) {
    return Ft.createGridImage(100, 100, 4, 4, t, e);
  }
  static createDarkGridImg(t, e) {
    return Ft.createGridImage(100, 100, 4, 4, t, e);
  }
  static [Nt(443)](t) {
    const e = Nt, n = btoa(unescape(encodeURIComponent(t)));
    return e(417) + n;
  }
  static svgToImage(t) {
    let e = new Image();
    return e.src = Ft.svgToImageUrl(t), e;
  }
  static canvasColorFilter(t, e) {
    const n = Nt, r = t.getContext("2d"), i = r[n(430)](0, 0, t.width, t.height);
    let o = (a, h, l, c) => [e[0] * a / 255, e[1] * h / 255, e[2] * l / 255];
    typeof e == "function" && (o = e);
    for (let a = 0; a < i.data.length; a += 4) {
      let h = o(i.data[a], i.data[a + 1], i.data[a + 2], i.data[a + 3]);
      i.data[a] = h[0], i.data[a + 1] = h[1], i[n(418)][a + 2] = h[2], h[n(436)] > 3 && h[3] != null && (i.data[a + 3] = h[3]);
    }
    r[n(444)](i, 0, 0);
  }
  static colorFilter(t, e) {
    const n = Nt, r = Ft[n(457)], i = Ft.ctx;
    r.width = t.width, r.height = t[n(425)], i.drawImage(t, 0, 0), Ft[n(453)](r, e);
    const o = new Image();
    return o[n(456)] = r.toDataURL("image/png"), o;
  }
  static imageToBase64(t) {
    const e = Nt, n = Ft.canvas, r = Ft.ctx;
    return n.width = t[e(454)], n.height = t[e(425)], r[e(420)](t, 0, 0), n[e(441)]();
  }
  static parseImgUrl(t) {
    const e = Nt;
    if (t.startsWith("data:image/"))
      return t;
    if (t.startsWith(e(445))) {
      let n = t.match(/url\((['"]?)(.*?)\1\)/);
      if (n)
        return n[2];
      throw new Error("Image url error: " + t);
    }
    return "";
  }
  static loadAndConvertImage(t) {
    return new Promise((e, n) => {
      const r = wn;
      try {
        if (t.startsWith(r(451)))
          return void e(t);
        fetch(t).then((i) => {
          const o = r;
          if (!i.ok)
            throw new Error(o(424) + i.status + " : " + t);
          return i.blob();
        }).then((i) => {
          const o = new FileReader();
          o.onloadend = function() {
            const a = o[wn(455)];
            e(a);
          }, o.onerror = function() {
            n(new Error(wn(432) + t));
          }, o.readAsDataURL(i);
        });
      } catch (i) {
        n(i);
      }
    });
  }
  static [Nt(437)](t) {
    const e = Nt, n = t.map((r) => Ft[e(427)](r));
    return Promise[e(438)](n);
  }
};
zr.canvas = za, zr[Nt(434)] = za[Nt(448)]("2d", { willReadFrequently: !0 });
let qn = zr;
var _l = sr;
function Eo() {
  var s = ["23430924QUCagP", "1076167yAlvEn", "visible", "lineDashScale", "2278759SzJgUj", "18PyvjLW", "rgba(255,0,0,0.9)", "2829756vbYhtB", "bottom", "show", "top", "3233536JKDNvs", "4385635woUVbA", "12AJEYfm", "188466ezSDNv"];
  return (Eo = function() {
    return s;
  })();
}
function sr(s, t) {
  var e = Eo();
  return (sr = function(n, r) {
    return e[n -= 271];
  })(s, t);
}
(function() {
  for (var s = sr, t = Eo(); ; )
    try {
      if (-parseInt(s(284)) / 1 + -parseInt(s(273)) / 2 * (parseInt(s(282)) / 3) + parseInt(s(275)) / 4 + -parseInt(s(280)) / 5 + -parseInt(s(281)) / 6 * (parseInt(s(272)) / 7) + parseInt(s(279)) / 8 + parseInt(s(283)) / 9 === 545301)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class yh {
  constructor() {
    var t = sr;
    this[t(285)] = !1, this[t(271)] = 1, this.styleX = new Ut({ strokeStyle: "rgba(255,0,0,0.5)", fillStyle: t(274), textAlign: "right", textBaseline: t(278), lineWidth: 1, font: "12px arial" }), this.styleY = new Ut({ strokeStyle: "rgba(0,255,0, 0.5)", fillStyle: "rgba(0,255,0, 0.9)", textBaseline: t(276), lineWidth: 1, font: "12px arial" });
  }
  [_l(277)]() {
    this.visible = !0;
  }
  hide() {
    this.visible = !1;
  }
}
function Co(s, t) {
  var e = Ao();
  return (Co = function(n, r) {
    return e[n -= 137];
  })(s, t);
}
var xe = Co;
(function() {
  for (var s = Co, t = Ao(); ; )
    try {
      if (parseInt(s(140)) / 1 * (-parseInt(s(155)) / 2) + parseInt(s(150)) / 3 * (parseInt(s(138)) / 4) + parseInt(s(146)) / 5 + -parseInt(s(141)) / 6 * (-parseInt(s(156)) / 7) + -parseInt(s(152)) / 8 + -parseInt(s(149)) / 9 + parseInt(s(148)) / 10 * (parseInt(s(139)) / 11) === 759749)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Sl = Object[xe(147)], Pl = Object.getOwnPropertyDescriptor, ja = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Pl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Sl(t, e, i), i;
};
class es extends E {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    var o = xe;
    super(t, e, n, r, i), this.aeOptions = {}, this[o(142)] = [];
  }
  pause() {
    this[xe(143)] && this.animations.forEach((t, e) => {
      t.cancel();
    });
  }
  [xe(153)]() {
    var t = xe;
    this[t(143)] && this.animations[t(137)]((e, n) => {
      e.play();
    });
  }
  removeFromParent() {
    var t = xe;
    return super.removeFromParent(), this.animationSystem && this[t(143)][t(145)](this), this;
  }
  destroy() {
    super[xe(154)](), this.aeOptions = null, this.animations = null, this.animationSystem = null;
  }
}
function Ao() {
  var s = ["destroy", "482IHiAEs", "84SffzTi", "forEach", "28IUClOy", "99wYLeRM", "5557TtEOgJ", "671214DVZhra", "animations", "animationSystem", "AENode", "removeAENode", "2355560UiFtHq", "defineProperty", "196090DetHvz", "9048726wuoREt", "539559DiLlEt", "_serializers", "1156736UDgOtY", "play"];
  return (Ao = function() {
    return s;
  })();
}
function mh(s, t) {
  var e = Do();
  return (mh = function(n, r) {
    return e[n -= 225];
  })(s, t);
}
ja([p(xe(144))], es.prototype, "className", 2), ja([p(E.prototype._serializers.concat(["aeOptions"]))], es.prototype, xe(151), 2), function() {
  for (var s = mh, t = Do(); ; )
    try {
      if (-parseInt(s(232)) / 1 + -parseInt(s(229)) / 2 * (-parseInt(s(231)) / 3) + -parseInt(s(233)) / 4 + -parseInt(s(226)) / 5 + parseInt(s(228)) / 6 + parseInt(s(230)) / 7 * (-parseInt(s(225)) / 8) + parseInt(s(227)) / 9 === 942901)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
class kl extends ve {
  constructor() {
    super(), this.stoped = !1;
  }
  dispose() {
  }
}
function Do() {
  var s = ["2269792nAsprY", "11596408RqGhHB", "2869045jhIbou", "37295667HqSktN", "3472998pKtUSF", "127198kcImJU", "7BAzlue", "6JQAGBt", "1316285WbqraP"];
  return (Do = function() {
    return s;
  })();
}
function ns(s, t) {
  const e = No();
  return (ns = function(n, r) {
    return e[n -= 273];
  })(s, t);
}
function No() {
  const s = ["toDataURL", "height", "context", "rect", "0px", "absolute", "6646448KyIGoP", "save", "lineDash", "10wqTsOr", "selectedStyle", "getWidth", "65GtPzyl", "closePath", "paint", "style", "showSelected", "_worldTransform", "getStyle", "227980JYIypV", "_paintFlattenObjects", "7800617wKwDwZ", "borderWidth", "width", "5330910eHVJxN", "setCursor", "3439590IhGgOC", "4143aQmVZV", "restore", "lineTo", "setLineDash", "getHeight", "9vbbZnw", "484sorNtt", "3454821hDPvyf", "canvas", "parent", "contextExtends", "destroyed", "draw"];
  return (No = function() {
    return s;
  })();
}
const St = ns;
(function() {
  const s = ns, t = No();
  for (; ; )
    try {
      if (parseInt(s(303)) / 1 * (parseInt(s(309)) / 2) + -parseInt(s(310)) / 3 + parseInt(s(295)) / 4 * (-parseInt(s(288)) / 5) + parseInt(s(300)) / 6 + parseInt(s(302)) / 7 + parseInt(s(282)) / 8 * (parseInt(s(308)) / 9) + parseInt(s(285)) / 10 * (-parseInt(s(297)) / 11) === 611578)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Ih extends kl {
  constructor() {
    const t = ns;
    super(), this[t(274)] = !1;
    const e = document.createElement(t(311));
    this.canvas = e, Object.assign(e[t(291)], { position: t(281), left: t(280), touchAction: "none" }), this[t(278)] = e.getContext("2d"), window.devicePixelRatio && this.context.scale(window.devicePixelRatio, window.devicePixelRatio), this.contextExtends();
  }
  [St(296)](t, e) {
    const n = St;
    let r = this.context;
    for (let i = 0; i < t.length; i++) {
      let o = t[i];
      if (r.save(), o instanceof E) {
        let a = o[n(293)].m;
        r.transform(a[0], a[1], a[2], a[3], a[4], a[5]);
      } else if (!(o[n(312)] instanceof Fe)) {
        let a = o.parent[n(293)].m;
        r.transform(a[0], a[1], a[2], a[3], a[4], a[5]);
      }
      this.paint(o, e), r.restore();
    }
  }
  [St(290)](t, e) {
    const n = St;
    let r = this.context, i = t.isSelected && t[n(292)] == 1 && e !== null;
    i && (r[n(283)](), this.paintSelected(t, e)), t[n(275)](r), i && r.restore();
  }
  paintSelected(t, e) {
    const n = St;
    let r = this.context;
    if (t instanceof E) {
      let i = t[n(286)] || e.currentTheme[n(294)]("NodeSelectedStyle");
      if (i[n(298)] > 0) {
        r.save(), r.beginPath();
        let o = i[n(298)];
        i[n(284)] != null && r[n(306)](i.lineDash), i.borderColor != null && (r.strokeStyle = i.borderColor), r.lineWidth = o;
        let a = t.width + 2 * o, h = t[n(277)] + 2 * o;
        r[n(279)](0.5 * -a, 0.5 * -h, a, h), r.stroke(), r[n(289)](), r[n(304)]();
      } else
        Object.assign(r, i);
    } else {
      let i = e.currentTheme.getStyle("LinkSelectedStyle");
      i.shadowColor != null && Object.assign(r, i);
    }
  }
  clearAll() {
    this.clear();
  }
  [St(273)]() {
    this.context.roundRect == null && (this.context.roundRect = function(t, e, n, r, i) {
      const o = ns;
      this.beginPath(), this.moveTo(t + i, e), this.lineTo(t + n - i, e), this.quadraticCurveTo(t + n, e, t + n, e + i), this[o(305)](t + n, e + r - i), this.quadraticCurveTo(t + n, e + r, t + n - i, e + r), this.lineTo(t + i, e + r), this.quadraticCurveTo(t, e + r, t, e + r - i), this.lineTo(t, e + i), this.quadraticCurveTo(t, e, t + i, e), this.closePath();
    });
  }
  show() {
    this.canvas.style.display = "block";
  }
  hide() {
    this.canvas.style.display = "none";
  }
  [St(287)]() {
    const t = St;
    return this[t(311)][t(299)];
  }
  [St(307)]() {
    const t = St;
    return this.canvas[t(277)];
  }
  setSize(t, e) {
    this.canvas.width = t, this.canvas.height = e;
  }
  getCursor() {
    return this.canvas.style.cursor;
  }
  [St(301)](t) {
    const e = St;
    this.canvas[e(291)].cursor = t;
  }
  toDataURL(t, e) {
    const n = St;
    return t = t || "image/png", this.canvas[n(276)](t, e);
  }
  clear() {
    const t = St;
    this.canvas[t(299)] = this.canvas.width;
  }
  dispose() {
    this.destroyed = !0, this.canvas.remove();
  }
}
const zn = Mo;
function Mo(s, t) {
  const e = Bo();
  return (Mo = function(n, r) {
    return e[n -= 185];
  })(s, t);
}
(function() {
  const s = Mo, t = Bo();
  for (; ; )
    try {
      if (-parseInt(s(211)) / 1 + -parseInt(s(216)) / 2 * (parseInt(s(199)) / 3) + -parseInt(s(217)) / 4 * (-parseInt(s(186)) / 5) + parseInt(s(215)) / 6 + parseInt(s(206)) / 7 * (-parseInt(s(187)) / 8) + parseInt(s(207)) / 9 + parseInt(s(196)) / 10 === 710475)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Ll = je.gc;
let Wa = ft.w;
class xh extends Ih {
  constructor() {
    super();
  }
  [zn(193)](t) {
    const e = zn, n = t.stage.styleSystem;
    this.clear();
    const r = n.currentTheme[e(194)]("DefaultConfig");
    Object.assign(this.context, r), t._axis[e(188)] && this.paintAxis(t), this[e(185)](t, t.stage[e(201)]), rn.paintAABB == 1 && t.displayList != null && this[e(210)](t);
    {
      if (Wa == null)
        return;
      let i = this.context;
      i.save(), i[e(202)] = 0.8, i.font = e(198);
      let o = Ll(Wa);
      i.fillStyle = "gray", i.fillText(o, 14, this.getHeight() - 14), i.restore();
    }
  }
  paintLayer(t, e) {
    const n = zn;
    let r = this.context;
    r[n(214)]();
    let i = e.getTransform().m;
    return r.transform(i[0], i[1], i[2], i[3], i[4], i[5]), t[n(190)][n(195)](r), t.displayList.forEach((o) => o.painted = !0), this._paintFlattenObjects(t[n(191)], t[n(205)].styleSystem), r.restore(), t;
  }
  paintAABB(t) {
    const e = zn;
    let n = t.stage[e(201)], r = this[e(212)], i = t.displayList;
    for (let o = i.length - 1; o >= 0; o--) {
      let a = i[o], h = a._getAABBWithText();
      h = n.toScreenRect(h), r.save(), a instanceof Fe ? r.strokeStyle = "rgba(0,0,255,0.3)" : a instanceof z ? r.strokeStyle = "pink" : r[e(204)] = e(200), r.beginPath(), r.rect(h.x, h.y, h[e(213)], h[e(208)]), r[e(197)](), r.closePath(), r.restore();
    }
  }
  paintAxis(t) {
    const e = zn, n = t[e(203)], r = t.stage;
    let i = this[e(212)];
    const o = r.camera.localView.object || t, a = r.width, h = r.height, l = o[e(209)](0, 0), c = r.camera.toScreenXY(l.x, l.y);
    i.save(), c.x > 0 && c.x < a && (i.beginPath(), n.styleY.applyTo(i), i.moveTo(c.x, 0), i[e(192)](c.x, h), i.moveTo(c.x - 5, h - 8), i.lineTo(c.x, h), i.lineTo(c.x + 5, h - 8), i.stroke(), i[e(189)]("+y", c.x + 6, h - 5)), c.y > 0 && c.y < h && (i.beginPath(), n.styleX.applyTo(i), i.moveTo(0.5 * a, c.y), i.lineTo(0, c.y), i.moveTo(0.5 * a, c.y), i[e(192)](a, c.y), i.moveTo(a - 8, c.y - 5), i.lineTo(a, c.y), i.lineTo(a - 8, c.y + 5), i.stroke(), i.fillText("+x", a - 5, c.y + 5)), i.restore();
  }
}
function Bo() {
  const s = ["localToWorldXY", "paintAABB", "238563nYpjCR", "context", "width", "save", "2414130Okkehj", "147242ZyWrCb", "622604qPtOxf", "paintLayer", "45XfgxWH", "8ZhzOls", "visible", "fillText", "_computedStyle", "displayList", "lineTo", "renderLayer", "getStyle", "applyTo", "86200nOhXhF", "stroke", "bold 16px arial", "3iJzCTE", "green", "camera", "globalAlpha", "_axis", "strokeStyle", "stage", "9458281mUWbYu", "5058072wUdmbT", "height"];
  return (Bo = function() {
    return s;
  })();
}
const T = ss;
function zo() {
  const s = ["loadImageWithObj", "containsRect", "useLightGridBackground", "_checkAndGetFlattenList", "useDarkGridBackground", "styleIndexMap", "push", "_doTransform", "addChildren", "frames", "_matrixDirty", "backgroundRepeat", "displayList", "keys", "stage", "176XoDvBn", "10NOQGtN", "8292tVxBhy", "parseImgUrl", "pickable", "outLinks", "795134soNEQT", "querySelector", "3366522Taalyc", "_beforeToJSON", "cancelLoadByObject", "xInWorld", "rgb(255,255,255)", "update", "prototype", "isDirty", "hide", "toJSON", "52707YzOVAY", "_calcBackgroundPosition", "_setRender", "canSee", "setBackground", "_background", "5LKiCUz", "set", "canvas", "classList", "px ", "dirty", "children", "_updateRenderSize", "animationSystem", "_displayListDirty", "height", "background", "dispose", "_frames", "style", "yInWorld", "isLink", "_findChildren", "parent", "_serializers", "hitTest", "5099192clqMCO", "1633206xHkYwK", "_state", "name", "length", " repeat", "8624ZENoeA", "7iuEIxm", "render", "zIndex", "show", "_attrDirty", "addChild", "_requestReapint", "width", "13506903qqjrhO", "_pickUp", "_allwaysSerializers", "rgb(36,36,36)", "endLoopRender", "getAllNodes"];
  return (zo = function() {
    return s;
  })();
}
function ss(s, t) {
  const e = zo();
  return (ss = function(n, r) {
    return e[n -= 245];
  })(s, t);
}
(function() {
  const s = ss, t = zo();
  for (; ; )
    try {
      if (parseInt(s(279)) / 1 + parseInt(s(281)) / 2 + -parseInt(s(291)) / 3 * (-parseInt(s(273)) / 4) + parseInt(s(297)) / 5 * (parseInt(s(319)) / 6) + parseInt(s(325)) / 7 * (-parseInt(s(318)) / 8) + parseInt(s(252)) / 9 * (-parseInt(s(274)) / 10) + -parseInt(s(324)) / 11 * (parseInt(s(275)) / 12) === 843722)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Ol = Object.defineProperty, Tl = Object.getOwnPropertyDescriptor, cn = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Tl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Ol(t, e, i), i;
};
const Ze = class Hn extends ct {
  constructor(t) {
    const e = ss;
    super(), this._renderTimes = 0, this.cuttingHide = !0, this.displayList = [], this._flattenList = [], this._axis = new yh(), this[e(310)] = 0, this[e(250)] = !1, this._bgInfo = { sw: 1, sh: 1, x: 0, y: 0 }, this._displayListDirty = !0, this._treeDirty = !0, this._needUpdateDisplayList = !0, this.ownerLayer = this, this[e(270)] = [];
    let n = new xh();
    this[e(293)](n), t instanceof or ? t.addLayer(this) : typeof t == "string" && (this[e(321)] = t);
  }
  set background(t) {
    this.setBackground(t);
  }
  get background() {
    return this[ss(296)];
  }
  get [T(267)]() {
    return this[T(310)];
  }
  set frames(t) {
    this._frames = t;
  }
  getRect() {
    const t = T;
    return new O(0, 0, this[t(251)], this[t(307)]);
  }
  resize(t, e) {
    this.render.setSize(t, e);
  }
  _onMound(t) {
    this.stage = t, this._markAllDirty();
  }
  update() {
    this._requestReapint = !0;
  }
  [T(260)]() {
    const t = T;
    this.setBackground({ background: qn.createLightGridImg(t(285), "rgb(240,240,240)") + t(323) });
  }
  [T(262)]() {
    const t = T;
    this[t(295)]({ background: qn.createDarkGridImg(t(255), "rgb(20,20,20)") + " repeat" });
  }
  _setRender(t) {
    const e = T;
    this.render != null && this[e(245)][e(309)](), this.render = t, this[e(299)] = t[e(299)], this[e(286)]();
  }
  [T(304)](t, e) {
    const n = T;
    (t != this[n(245)].getWidth() || e != this[n(245)].getHeight()) && (this.render.setSize(t, e), this.resize(t, e), this[n(286)]());
  }
  _pickUpByRect(t) {
    const e = T;
    let n = [], r = this[e(270)];
    if (r != null)
      for (let i = 0; i < r.length; i++) {
        let o = r[i], a = o._obb.aabb;
        o.pickable() && t[e(259)](a) && n[e(264)](o);
      }
    return n;
  }
  [T(253)](t, e) {
    const n = T;
    t == null && (t = this[n(272)].inputSystem[n(284)]), e == null && (e = this[n(272)].inputSystem[n(312)]);
    for (let r = this.displayList.length - 1; r >= 0; r--) {
      let i = this.displayList[r];
      if (i[n(277)]() && i[n(317)](t, e)) {
        let o = ls._getTopFrozenParent(i);
        return o ?? i;
      }
    }
    return null;
  }
  [T(292)](t = !1) {
    const e = T;
    if (this.stage == null)
      return;
    const n = this.render.canvas;
    let r = n.style[e(269)], i = this._backgroundImageObject;
    if (i != null && r == "repeat") {
      let o = this._bgInfo, a = i.width, h = i.height, l = this.stage.camera, c = a * l.scale, u = h * l.scale, d = l.getOffsetInScreen(), f = 0.5 * n.width + d.x, y = 0.5 * n.height + d.y;
      (t || o.sw != c || o.sh != u || o.x != f || o.y != y) && (n.style.backgroundSize = c + e(301) + u + "px", n[e(311)].backgroundPosition = f + e(301) + y + "px"), o.sw = c, o.sh = u, o.x = f, o.y = y;
    }
  }
  getAABB() {
    const t = T;
    let e = this.stage.camera, n = this._flattenList.filter((i) => i.visible && e[t(294)](i));
    if (n.length == 0)
      return new O(0, 0, 1, 1);
    let r = n.map((i) => i._obb.aabb);
    return O.unionRects(r);
  }
  _getExportAABB() {
    let t = this[T(272)].camera, e = this._flattenList.filter((r) => r.visible && t.canSee(r));
    if (e.length == 0)
      return new O(0, 0, 1, 1);
    let n = e.map((r) => r._getAABBWithText());
    return O.unionRects(n);
  }
  setZIndex(t) {
    const e = T;
    this._zIndex = t, this[e(272)] && this.stage.updateZIndex();
  }
  show() {
    return super[T(247)](), this.render.show(), this;
  }
  hide() {
    const t = T;
    return super[t(289)](), this.render[t(289)](), this;
  }
  draw(t) {
  }
  _forceUpdate() {
    const t = T;
    this.visible == 0 || this.destroyed || this.render.stoped || this[t(245)].destroyed == 1 || this.stage.renderSystem._tickLayer(this, Date.now());
  }
  _markAllDirty() {
    this._treeDirty = !0, this.querySelectorAll().forEach((t) => {
      t.style.dirty = !0, t._matrixDirty = !0;
    });
  }
  setStyles(t) {
    return this.setBackground(t);
  }
  setBackground(t) {
    const e = T;
    this._background = t;
    const n = this.canvas.style;
    Object.assign(n, t);
    const r = this;
    ft[e(283)](this);
    let i = n.backgroundImage;
    if (i && i[e(322)] > 0 && i !== "initial") {
      let o = qn[e(276)](i);
      o != "" && ft[e(258)](this, o, function(a) {
        r._backgroundImageObject = a, r._calcBackgroundPosition(!0);
      });
    }
    return this._calcBackgroundPosition(!0), this;
  }
  [T(249)](t) {
    const e = T;
    return super.addChild(t), this[e(286)](), this;
  }
  [T(266)](t) {
    return super.addChildren(t), this.update(), this;
  }
  [T(257)]() {
    return this._findChildren((t) => t.isNode, !0);
  }
  getAllLinks() {
    const t = T;
    return this[t(314)]((e) => e[t(313)], !0);
  }
  querySelectorAll(t) {
    return super.querySelectorAll(t);
  }
  querySelector(t) {
    return super[T(280)](t);
  }
  loopRender(t = 60) {
    this[T(310)] = t;
  }
  [T(256)]() {
    this[T(310)] = 0;
  }
  _prepareRenderData() {
    const t = T;
    if (this._needUpdateDisplayList = this._treeDirty || this[t(272)].camera[t(288)]() || this._displayListDirty, this._treeDirty)
      return this._flattenList = this[t(261)](this.children, []), void (this._treeDirty = !1);
    for (let e = 0; e < this._flattenList.length; e++) {
      let n = this._flattenList[e];
      n[t(315)][t(268)] && (n._matrixDirty = !0), (n._matrixDirty || n.style[t(302)] == 1) && (this[t(306)] = !0, Hn._markAllRelativeLinksDirty(this, n, !0)), n._state[t(248)] && (this[t(250)] = !0, n._state._attrDirty = !1), n instanceof es && n[t(305)] == null && this.stage && this.stage[t(305)].addAENode(n);
    }
  }
  _checkAndGetFlattenList(t, e) {
    const n = T, r = this;
    for (let i = 0; i < t[n(322)]; i++) {
      let o = t[i];
      e.push(o), o[n(315)]._matrixDirty && (o[n(268)] = !0), (o._matrixDirty || o.style[n(302)] == 1) && (this._displayListDirty = !0, Hn._markAllRelativeLinksDirty(r, o, !0)), o._state[n(248)] && (this._requestReapint = !0, o[n(320)]._attrDirty = !1), o instanceof es && o[n(305)] == null && this[n(272)] && this[n(272)][n(305)].addAENode(o), o[n(303)][n(322)] > 0 && this._checkAndGetFlattenList(o[n(303)], e);
    }
    return e;
  }
  static _markAllRelativeLinksDirty(t, e, n = !0) {
    const r = T;
    let i = e.inLinks;
    for (let a = 0; a < i.length; a++) {
      let h = i[a];
      !h._matrixDirty && (h._matrixDirty = !0, n && Hn._markAllRelativeLinksDirty(t, h));
    }
    let o = e[r(278)];
    for (let a = 0; a < o.length; a++) {
      let h = o[a];
      !h._matrixDirty && (h._matrixDirty = !0, n && Hn._markAllRelativeLinksDirty(t, h));
    }
  }
  translateWith(t, e) {
    return this;
  }
  _getSegmentPoints() {
    return [];
  }
  changeParent(t) {
    return this;
  }
  [T(265)](t) {
  }
  _getOBBPoints() {
    return [];
  }
  [T(282)](t) {
    const e = T;
    let n = this.style;
    if (t[e(263)].get(n) == null) {
      let r = n[e(290)](t.indexImage);
      if (Object[e(271)](r).length > 0) {
        let i = t.styles[e(322)];
        t.styleIndexMap[e(298)](n, i), t.styles.push(r);
      }
    }
  }
  destroy() {
    const t = T;
    if (this.destroyed)
      throw new Error("Layer has been destroyed already.");
    this.destroyed = !0, this.stage && this.stage.removeLayer(this), this[t(245)][t(309)](), this.displayList = void 0, this._flattenList = void 0, this.listeners = void 0, this.style = void 0, this[t(300)].length = 0, this.render = void 0, this.stage = void 0, this[t(303)].forEach((e) => e.removeFromParent()), this.children[t(322)] = 0;
  }
};
cn([p("Layer")], Ze[T(287)], "className", 2), cn([p(!0)], Ze.prototype, "isLayer", 2), cn([p(tt.MinDeep - 1)], Ze.prototype, "deep", 2), cn([p(["className", "isLayer"])], Ze.prototype, T(254), 2), cn([p(["id", "name", T(308), T(246), "visible"])], Ze.prototype, T(316), 2), cn([p("undefined")], Ze.prototype, "_layerIndex", 2);
let Fe = Ze;
function jo() {
  const s = ["810juloNS", "inputSystem", "quit", "42FzXfMQ", "object", "647880YBpTkK", "32888ylBBbi", "enter", "isNode", "stage", "camera", "6606579YWvNec", "43bKgQqv", "yInWorld", "isSelected", "4fFNkFR", "exclude", "208087UvXTbK", "4284064LbqtQA", "markDirty", "hideList", "getObject", "xInWorld", "6590709XByAoC", "583975yQSmGQ"];
  return (jo = function() {
    return s;
  })();
}
const Xe = Wo;
function Wo(s, t) {
  const e = jo();
  return (Wo = function(n, r) {
    return e[n -= 267];
  })(s, t);
}
(function() {
  const s = Wo, t = jo();
  for (; ; )
    try {
      if (-parseInt(s(273)) / 1 * (-parseInt(s(267)) / 2) + parseInt(s(291)) / 3 * (parseInt(s(276)) / 4) + parseInt(s(285)) / 5 * (-parseInt(s(289)) / 6) + -parseInt(s(272)) / 7 + parseInt(s(279)) / 8 + -parseInt(s(284)) / 9 + -parseInt(s(286)) / 10 * (-parseInt(s(278)) / 11) === 497174)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class El {
  constructor(t) {
    this.mode = "painted", this.stage = t;
  }
  [Xe(268)](t) {
    const e = Xe;
    if (this.object != null && this.quit(), !(t != null && t !== this.object && t[e(269)] && t.getRoot() instanceof Fe))
      return void (this.object = null);
    this[e(290)] = t;
    let n = this[e(270)].getCurrentLayer();
    this.hideList = ct.flatten(n.children, (i) => i !== t), t[e(275)] = !1;
    let r = this.stage.camera;
    this[e(281)].forEach(function(i, o) {
      r[e(277)](i);
    });
  }
  [Xe(288)]() {
    const t = Xe;
    if (this.object = null, this[t(281)] != null) {
      let e = this.stage[t(271)];
      this.hideList.forEach(function(n, r) {
        e.include(n);
      }), this.hideList = null;
    }
    this.stage.camera[t(280)]();
  }
  [Xe(282)]() {
    const t = Xe;
    return this.object || this[t(270)].getCurrentLayer();
  }
  getMouseXY() {
    const t = Xe;
    return this.object == null ? { x: this[t(270)].inputSystem[t(283)], y: this.stage[t(287)].yInWorld } : this[t(290)].worldToLocalXY(this[t(270)].inputSystem.xInWorld, this.stage.inputSystem[t(274)]);
  }
}
const D = rr;
(function() {
  const s = rr, t = Fo();
  for (; ; )
    try {
      if (-parseInt(s(187)) / 1 * (-parseInt(s(200)) / 2) + parseInt(s(203)) / 3 + -parseInt(s(192)) / 4 + parseInt(s(232)) / 5 + parseInt(s(213)) / 6 * (parseInt(s(183)) / 7) + -parseInt(s(210)) / 8 + -parseInt(s(215)) / 9 === 490836)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class bh extends sn {
  constructor(t, e) {
    super(t, e);
  }
}
class wh extends ve {
  constructor(t) {
    const e = rr;
    super(), this[e(191)] = /* @__PURE__ */ new WeakMap(), this[e(227)] = 0, this._offsetY = 0, this._scale = 1, this._cameraDirty = !0, this.screenTransform = xt.allocate(), this.screenInvertTransform = xt[e(180)](), this.enableWheelZoom = !0, this[e(224)] = !1, this.zoomInFactor = 1.25, this[e(185)] = 0.8, this[e(182)] = 10, this.zoomOutLimit = 0.1, this.viewportRect = new O(0, 0, 1, 1), this.lookAtX = 0, this.lookAtY = 0, this[e(226)] = t, this.localView = new El(t), this.localView[e(228)] = null;
  }
  lock() {
    this._locked = !0;
  }
  unlock() {
    this._locked = !1;
  }
  exclude(t) {
    this._excludeMap.set(t, !0), this.markDirty();
  }
  [D(229)](t) {
    this._excludeMap.delete(t), this.markDirty();
  }
  canSee(t) {
    return !this._excludeMap.has(t);
  }
  [D(195)](t, e) {
    const n = D;
    this.lookAtX = t, this.lookAtY = e;
    let r = this.toScreenXY(t, e), i = this.stage[n(205)](), o = i.x - r.x, a = i.y - r.y;
    this.offsetWith(o / this.scale, a / this[n(234)]);
  }
  getOffsetInScreen() {
    const t = D;
    let e = this.toScreenXY(0, 0);
    return { x: e.x - this[t(226)][t(179)], y: e.y - this.stage.halfHeight };
  }
  zoomOut() {
    this[D(219)](this.zoomOutFactor);
  }
  [D(217)]() {
    this.zoomBy(this.zoomInFactor);
  }
  zoom(t) {
    const e = D;
    let n = t / this[e(234)];
    this.zoomBy(n, this[e(189)], this.lookAtY);
  }
  addEventListener(t, e) {
    super.addEventListener(t, e);
  }
  [D(196)](t, e) {
    super.removeEventListener(t, e);
  }
  hasListener(t) {
    return super[D(209)](t);
  }
  zoomBy(t, e, n) {
    const r = D;
    if (this._locked)
      return;
    if (this.scale * t > this[r(182)] ? t = this.zoomInLimit / this.scale : this[r(234)] * t < this.zoomOutLimit && (t = this.zoomOutLimit / this.scale), this.hasListener(r(231))) {
      let l = new bh(r(231), { cancelable: !0, zoomInfo: { factor: t, x: e, y: n } });
      if (this.dispatchEvent(l), l.defaultPrevented == 1)
        return;
    }
    if (this._updateMatrix(), e == null || n == null) {
      let l = this.stage.getRect().getCenter(), c = this.toWorldXY(l.x, l.y);
      e = c.x, n = c.y;
    }
    let i = this.toScreenXY(e, n);
    this[r(234)] *= t, this[r(212)]();
    let o = this.toScreenXY(e, n), a = (i.x - o.x) / this.scale, h = (i.y - o.y) / this.scale;
    this.offsetWith(a, h), this[r(212)]();
  }
  [D(199)](t, e) {
    const n = D;
    return this.screenTransform[n(225)](t, e);
  }
  toWorldXY(t, e) {
    return this.screenInvertTransform.pointXY(t, e);
  }
  toWorldRect(t) {
    return ue[D(208)](new O(), this.screenInvertTransform.points([], t.toPoints()));
  }
  [D(230)](t) {
    const e = D;
    return ue[e(208)](new O(), this.screenTransform.points([], t[e(218)]()));
  }
  [D(214)](t, e) {
    this._locked || this.offsetWith(t, e);
  }
  [D(188)](t) {
    const e = D;
    t == null ? this[e(226)][e(222)].localView.quit() : this.stage.camera.localView.enter(t), this[e(193)]();
  }
  [D(216)]() {
    return this[D(221)].object;
  }
  zoomToFit(t = {}) {
    const e = D, n = this[e(226)];
    let r = n[e(207)].map((c) => c[e(198)]()), i = O.unionRects(r), o = t.padding || 0, a = (n.width - 2 * o) / i.width, h = (n.height - 2 * o) / i.height, l = Math.min(a, h);
    this[e(195)](i.center, i.middle), this.zoom(l);
  }
  lookAtContentCenter(t) {
    const e = D, n = this.stage;
    t == null && (t = n.getCurrentLayer()), t && n[e(222)].lookAtObject(t.children);
  }
  [D(220)](t) {
    const e = D;
    let n;
    if (t instanceof ct)
      n = t.getAABB();
    else {
      if (t.length == 0)
        return void this.lookAt(0, 0);
      let r = t.map((i) => i[e(198)]());
      n = O.unionRects(r);
    }
    this.lookAt(n.x + 0.5 * n.width, n.y + 0.5 * n.height);
  }
  _updateMatrix() {
    const t = D;
    let e = this[t(202)];
    e.identity();
    let n = this.offsetX + 0.5 * this.stage[t(211)], r = this.offsetY + 0.5 * this.stage.height;
    e[t(234)](this[t(234)], this.scale), e.translate(n, r), this[t(190)] = e[t(201)]();
    let i = this.stage[t(233)]().getCenter(), o = this.toWorldXY(i.x, i.y);
    this[t(189)] = o.x, this.lookAtY = o.y;
    let a = this.stage.getRect().toPoints(), h = ue[t(208)](new O(), this.screenInvertTransform.points([], a));
    this.viewportRect = h;
  }
  [D(181)](t, e) {
    const n = D;
    this._offsetX += t, this[n(204)] += e, this[n(206)] = !0;
  }
  setOffset(t, e) {
    const n = D;
    this._offsetX = t, this[n(204)] = e, this[n(206)] = !0;
  }
  isDirty() {
    return this._cameraDirty;
  }
  [D(193)]() {
    this._cameraDirty = !0;
  }
  clearDirty() {
    this._cameraDirty = !1;
  }
  getTransform() {
    return this.screenTransform;
  }
  [D(197)]() {
    return this[D(202)];
  }
  getObjectScreenTransform(t) {
    const e = D;
    let n = t.getWorldTransform(), r = n.copy();
    return xt[e(186)](r, this[e(202)], n), r;
  }
  get offsetX() {
    return this._offsetX;
  }
  set [D(194)](t) {
    this._offsetX !== t && (this._cameraDirty = !0), this._offsetX = t;
  }
  get [D(184)]() {
    return this[D(204)];
  }
  set offsetY(t) {
    const e = D;
    this._offsetY !== t && (this[e(206)] = !0), this._offsetY = t;
  }
  get scale() {
    return this._scale;
  }
  set scale(t) {
    this[D(223)] !== t && (this._cameraDirty = !0), this._scale = t;
  }
}
function rr(s, t) {
  const e = Fo();
  return (rr = function(n, r) {
    return e[n -= 179];
  })(s, t);
}
function Fo() {
  const s = ["hasListener", "3297664qsVHzJ", "width", "_updateMatrix", "6xjqMVA", "_dragWith", "3929166xZMevo", "getShowOnlyObject", "zoomIn", "toPoints", "zoomBy", "lookAtObject", "localView", "camera", "_scale", "_locked", "pointXY", "stage", "_offsetX", "mode", "include", "toScreenRect", "zoom", "1184135iBEROY", "getRect", "scale", "halfWidth", "allocate", "offsetWith", "zoomInLimit", "6194713vVjbcg", "offsetY", "zoomOutFactor", "multiply", "417FbwMDB", "lookOnly", "lookAtX", "screenInvertTransform", "_excludeMap", "2130200QbBLLC", "markDirty", "offsetX", "lookAt", "removeEventListener", "getScreenTransform", "getAABB", "toScreenXY", "1566wWTanR", "invert", "screenTransform", "1271613pgKUxP", "_offsetY", "getCenter", "_cameraDirty", "viewLayers", "toAABB"];
  return (Fo = function() {
    return s;
  })();
}
const $ = cs;
function Ro() {
  const s = ["paintInterval", "pointerdownHandler", "pointerX", "_flattenList", "update", "exportPaintObjects", "context", "width", "appendChild", "pointerY", "mousedragHandler", "scale", "viewLayers", "rectObj", "canSee", "15692YRCQaP", "7430giLUpp", "restore", "save", "18278622aoGtME", "_computedStyle", "red", "flatten", "getRect", "2234556LYDnjR", "9233126DVTwnH", "10299312tHPQxd", "applyTo", "cacheCanvas", "visible", "mousewheelHandler", "hide", "mousewheel", "canvas", "length", "opacity", "429pzBgNM", "getWidth", "paintSelected", "1132zRTuNg", "getHeight", "fillStyle", "resize", "_paintFlattenObjects", "isDraging", "dirty", "lineWidth", "left", "isPointerDown", "render", "976841DubAwn", "max", "pointermove", "style", "solid 1px gray", "height", "translate", "0.7", "show"];
  return (Ro = function() {
    return s;
  })();
}
function cs(s, t) {
  const e = Ro();
  return (cs = function(n, r) {
    return e[n -= 459];
  })(s, t);
}
(function() {
  const s = cs, t = Ro();
  for (; ; )
    try {
      if (parseInt(s(475)) / 1 + parseInt(s(499)) / 2 * (parseInt(s(461)) / 3) + -parseInt(s(464)) / 4 * (parseInt(s(500)) / 5) + -parseInt(s(508)) / 6 + -parseInt(s(509)) / 7 + -parseInt(s(510)) / 8 + parseInt(s(503)) / 9 === 730381)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class vh extends xh {
  constructor(t) {
    super();
  }
  [$(463)](t) {
  }
  overviewPaint(t) {
    const e = $, n = t.stage;
    let r = this[e(490)];
    r[e(502)]();
    const i = n.styleSystem.currentTheme.getStyle("DefaultConfig");
    this.context.fillStyle = i.fillStyle, this.context.strokeStyle = i.strokeStyle;
    let o = n.camera.getTransform().m;
    r.transform(o[0], o[1], o[2], o[3], o[4], o[5]), t[e(504)][e(511)](r);
    let a = n.camera;
    const h = t[e(487)].filter((l) => l._state._needPaint && a[e(498)](l));
    this[e(468)](h, n.styleSystem), r.restore();
  }
  [$(489)](t, e) {
    const n = $;
    if (t[0] instanceof Fe)
      t.forEach((r) => {
        r instanceof Fe && this.overviewPaint(r);
      });
    else {
      let r = [];
      t.forEach((i) => {
        const o = cs;
        r.push(i), r = r.concat(ct[o(506)](i.children, null));
      }), this[n(468)](r, e);
    }
  }
}
class Cl {
  constructor(t) {
    const e = $;
    this[e(513)] = !1, this[e(470)] = !0, this[e(484)] = 500, this[e(473)] = !1, this[e(469)] = !1, this.previousX = 0, this.previousY = 0, this[e(486)] = 0, this.pointerY = 0, this.dx = 0, this.dy = 0, this.stage = t, this.render = new vh(t);
    let n = this.render.canvas;
    n.style.backgroundColor = "rgba(255,255,255,0.5)", n.style.border = e(479), n.style.position = "absolute", n.style.zIndex = "" + (t.handlerLayer.zIndex + 1), n.style[e(460)] = e(482), n[e(478)].right = "0", n.style[e(472)] = null, n.style.bottom = "0", t.layersContainer[e(492)](n), this[e(517)] = n, this.domElement = n, this[e(474)].setSize(200, 123.6), this[e(512)] = document.createElement("canvas"), this.rectObj = new E(null, 0, 0), this.rectObj.hide(), this.initEvent(), this.hide();
  }
  setStyles(t) {
    const e = $;
    if (t == null)
      return this;
    for (let n in t)
      this.canvas[e(478)][n] = t[n];
    return this;
  }
  initEvent() {
    const t = $;
    let e = this, n = ["pointerdown", "pointerup", "pointermove", t(516), "pointerout"], r = e.render[t(517)];
    n.map(function(i) {
      We.addEventListener(r, i, function(o) {
        const a = cs;
        if (e[a(469)] = !1, o.offsetX < 0 || o.offsetY < 0 || i == "pointerout")
          return void (e.isPointerDown = !1);
        e[a(473)] && i == a(477) && (e.isDraging = !0), e.previousX = e[a(486)], e.previousY = e[a(493)], e.pointerX = o.offsetX, e[a(493)] = o.offsetY, e.dx = e.pointerX - e.previousX, e.dy = e.pointerY - e.previousY;
        let h = i + "Handler";
        if (e[h] == null)
          throw new Error("Overview has no handler:" + i);
        e[h](o);
      });
    });
  }
  [$(483)]() {
    const t = $;
    this.visible = !0, this.render.show(), clearInterval(this._overviewTimer);
    let e = this;
    return this._overviewTimer = setInterval(function() {
      e.dirty && e.update();
    }, this[t(484)]), this;
  }
  hide() {
    const t = $;
    return this.visible = !1, this.render[t(515)](), clearInterval(this._overviewTimer), this;
  }
  getWidth() {
    return this[$(474)].getWidth();
  }
  getHeight() {
    const t = $;
    return this.render[t(465)]();
  }
  setSize(t, e) {
    return this.render.setSize(t, e);
  }
  paint() {
    const t = $;
    this.dirty = !1;
    let e = this, n = e.stage, r = e.render, i = e.getWidth(), o = e.getHeight(), a = r.context, h = this.stage.exportSystem._getStageExportAABB();
    if (r.clearAll(), this[t(469)])
      a.drawImage(this.cacheCanvas, 0, 0);
    else {
      let l = i / Math.max(i, h[t(491)]), c = o / Math.max(o, h.height);
      a.save(), a[t(495)](l, c), a.translate(-h.x, -h.y), n.getAllVisibleLayers().forEach(function(d) {
        r.overviewPaint(d);
      }), a[t(501)]();
      let u = this.cacheCanvas.getContext("2d");
      this[t(512)].width = this.canvas.width, this.cacheCanvas[t(480)] = this.canvas[t(480)], u.drawImage(this.canvas, 0, 0);
    }
    this.paintDragRect(a, h);
  }
  paintDragRect(t, e) {
    const n = $;
    let r = this.rectObj, i = this.stage, o = this.render, a = Math[n(476)](e.width, i.width), h = Math.max(e.height, i.height), l = i.width / a, c = i[n(480)] / h;
    if (l == 1 && c == 1)
      return void r.hide();
    r.show();
    let u = o[n(462)]() * l, d = o[n(465)]() * c;
    r[n(467)](u, d);
    let f = o.getWidth() / a, y = o.getHeight() / h, I = -e.x * f, x = -e.y * y;
    I < 0 && (I = 0), x < 0 && (x = 0), I + r.width > o.getWidth() && (I = o.getWidth() - r[n(491)]), x + r.height > o.getHeight() && (x = o.getHeight() - r.height), r[n(481)](I, x), t.save(), t[n(471)] = 2, t[n(466)] = "rgba(0,250,50,0.2)", t.strokeStyle = n(505), t.beginPath(), t.rect(r.x, r.y, r[n(491)], r.height), t.stroke(), t.fill(), t[n(501)]();
  }
  update() {
    const t = $;
    this[t(513)] && this.stage[t(496)][t(459)] > 0 && this.paint();
  }
  [$(485)](t) {
    const e = $;
    this[e(473)] = !0;
    let n = this.rectObj[e(507)](), r = t.offsetX, i = t.offsetY;
    n.contains(r, i);
    let o = r - (this.rectObj.x + this.rectObj.width / 2), a = i - (this.rectObj.y + this.rectObj.height / 2);
    this.moveWith(o, a);
  }
  [$(494)]() {
    let t = this.dx, e = this.dy;
    this.moveWith(t, e);
  }
  moveWith(t, e) {
    const n = $;
    if (!this[n(497)].visible)
      return;
    t < 0 && this.rectObj.x + t <= 0 && (t = -this[n(497)].x), t > 0 && this.rectObj.x + this.rectObj[n(491)] >= this.getWidth() && (t = this.getWidth() - this.rectObj[n(491)] - this[n(497)].x), e < 0 && this.rectObj.y <= 0 && (e = -this[n(497)].y), e > 0 && this.rectObj.y + this.rectObj[n(480)] >= this.getHeight() && (e = this.getHeight() - this.rectObj.height - this.rectObj.y), this.rectObj.translateWith(t, e);
    let r = this.stage.exportSystem._getStageExportAABB(), i = r.width, o = r.height, a = i * (t / this.getWidth()), h = o * (e / this.getHeight());
    this.stage.camera._dragWith(-a / this.stage.camera[n(495)], -h / this.stage.camera.scale);
    let l = this;
    this._updateTimer = setTimeout(function() {
      l[n(488)]();
    }, 20);
  }
  [$(514)](t) {
    t.preventDefault();
  }
  pointermoveHandler() {
    this.isPointerDown && this.mousedragHandler();
  }
  pointerupHandler() {
    this.isPointerDown = !1;
  }
}
const Ge = Ee;
function Ho() {
  const s = ["saveDataAsFile", "document", "161eAEdge", "height", "92UMoSnF", "saveAsLocalImage", "click", "2223204qplLlQ", "aabb", "http://www.w3.org/1999/xhtml", "_obb", "getAllVisibleLayers", "527752fRqQaa", "20760510sIhAoY", "isArray", "3653037tEmyDt", "17293oasTyL", "299296ZeeCPx", "href", "styleSystem", "fillStyle", "toDataURL", "15rtXQkm", "stage", "_getStageExportAABB", "context", "<img src='", "initMouseEvent", "currentTheme", "src", "_getExportAABB", "render", "toScreenRect", "open", "782298nwVAJJ"];
  return (Ho = function() {
    return s;
  })();
}
function Ee(s, t) {
  const e = Ho();
  return (Ee = function(n, r) {
    return e[n -= 485];
  })(s, t);
}
(function() {
  const s = Ee, t = Ho();
  for (; ; )
    try {
      if (parseInt(s(505)) / 1 * (parseInt(s(493)) / 2) + parseInt(s(496)) / 3 + parseInt(s(501)) / 4 * (-parseInt(s(511)) / 5) + parseInt(s(488)) / 6 + -parseInt(s(491)) / 7 * (-parseInt(s(506)) / 8) + parseInt(s(504)) / 9 + -parseInt(s(502)) / 10 === 461433)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Al {
  constructor(t) {
    const e = Ee;
    this.stage = t, this[e(485)] = new vh(t);
  }
  toDataURL(t) {
    const e = Ee;
    let n = Array[e(503)](t) ? t : [t];
    return n.length > 0 && this._exportPaint(n), this.render[e(510)]();
  }
  toImage(t) {
    const e = Ee;
    let n = this[e(510)](t), r = new Image();
    return r[e(518)] = n, r;
  }
  [Ge(494)](t, e) {
    const n = Ge;
    let r = this[n(510)](t);
    e == null && (e = "jtopo_" + (/* @__PURE__ */ new Date()).getTime() + ".png"), this[n(489)](r, e);
  }
  saveImageInfo(t) {
    const e = Ge;
    let n = this.toDataURL(t);
    window[e(487)]("about:blank")[e(490)].write(e(515) + n + "' alt='from canvas'/>");
  }
  download(t, e) {
    (function(n) {
      const r = Ee, i = document.createElement("a"), o = URL.createObjectURL(n);
      i[r(507)] = o, i.download = n.name, document.body.appendChild(i), i[r(495)](), document.body.removeChild(i), URL.revokeObjectURL(o);
    })(new File([e], t, { type: "text/json" }));
  }
  _exportPaint(t) {
    const e = Ge;
    let n = this.render, r = t.map((c) => {
      const u = Ee;
      if (c instanceof Fe) {
        let d = c[u(519)]();
        return c[u(512)].camera[u(486)](d);
      }
      return c[u(499)][u(497)];
    }), i = O.unionRects(r), o = Math.max(1, i.width), a = Math.max(1, i[e(492)]);
    n.setSize(o, a);
    const h = n[e(514)];
    h.save(), h.translate(-i.x, -i.y);
    const l = this.stage.styleSystem[e(517)].getStyle("DefaultConfig");
    h.fillStyle = l[e(509)], h.strokeStyle = l.strokeStyle, n.exportPaintObjects(t, this[e(512)][e(508)]), h.restore();
  }
  saveDataAsFile(t, e) {
    const n = Ge;
    let r = document.createElementNS(n(498), "a");
    r[n(507)] = t, r.download = e;
    let i = document.createEvent("MouseEvents");
    i[n(516)](n(495), !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), r.dispatchEvent(i);
  }
  [Ge(513)]() {
    const t = Ge;
    let e = this.stage, n = e[t(500)]().map((r) => e.camera.toScreenRect(r._getExportAABB()));
    return O.unionRects(n);
  }
}
const ae = Uo;
(function() {
  const s = Uo, t = Jo();
  for (; ; )
    try {
      if (-parseInt(s(301)) / 1 * (-parseInt(s(302)) / 2) + -parseInt(s(304)) / 3 + -parseInt(s(296)) / 4 + -parseInt(s(323)) / 5 * (-parseInt(s(309)) / 6) + -parseInt(s(324)) / 7 * (parseInt(s(310)) / 8) + parseInt(s(290)) / 9 + parseInt(s(318)) / 10 === 703422)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Dl = Object.defineProperty, Nl = Object[ae(305)];
function Uo(s, t) {
  const e = Jo();
  return (Uo = function(n, r) {
    return e[n -= 290];
  })(s, t);
}
function Jo() {
  const s = ["min", "cuttingHide", "clear", "1226092SzvTBV", "pointerDownY", "SelectArea", "areaBox", "displayList", "21863ywtyGq", "50QnFQYE", "update", "3098898lxmHut", "getOwnPropertyDescriptor", "render", "pointerEnabled", "setStyles", "172554JaZXjL", "8OoepNY", "parent", "_pickUp", "stage", "restore", "className", "resize", "pointerupHandler", "5300830XMBplM", "translate", "height", "draw", "abs", "165MwRBfO", "158606eoBPph", "358776ZQmdbe", "painted", "currentTheme"];
  return (Jo = function() {
    return s;
  })();
}
const Ml = je.gc, Fa = ft.w;
class Bl extends Ih {
  constructor() {
    super();
  }
  renderLayer(t) {
    const e = ae;
    this[e(295)]();
    const n = t[e(313)];
    let r = this.context;
    return r.save(), t[e(321)](r), t.displayList.forEach((i) => i[e(291)] = !0), this._paintFlattenObjects(t[e(300)], n.styleSystem), r[e(314)](), t;
  }
}
class ir extends Fe {
  constructor(t) {
    const e = ae;
    super(), this._zIndex = Hs.HandlerLayerCanvas, this[e(294)] = !1, this._axis = new yh(), this.stage = t, this.areaBox = new E(), this[e(299)].name = e(299), this.areaBox[e(307)] = !1, this._axis.visible = !1, this.visible = !0, this._setRender(new Bl()), this.areaBox.setStyles(Vn.getStyle(e(298)));
  }
  _pickUp(t, e) {
    const n = ae;
    return t == null && (t = this.stage.inputSystem.x), e == null && (e = this[n(313)].inputSystem.y), super[n(312)](t, e);
  }
  showAreaBox() {
    const t = ae, e = this.stage.inputSystem, n = this.areaBox;
    n[t(311)] == null && this.addChild(n);
    let r = this.stage.styleSystem[t(292)];
    n[t(308)](r.getStyle("SelectArea"));
    let i = e.pointerDownX, o = e[t(297)], a = e.x, h = e.y, l = Math[t(322)](i - a), c = Math.abs(o - h), u = Math[t(293)](i, a), d = Math.min(o, h);
    return n[t(316)](l, c), n[t(319)](u, d), n.translateWith(0.5 * l, 0.5 * c), new O(u, d, n.width, n[t(320)]);
  }
  pointeroutHandler(t) {
    this[ae(317)]();
  }
  pointerupHandler() {
    this[ae(299)].removeFromParent();
  }
  [ae(303)]() {
    return this.children.length != 0 && (this._requestReapint = !0, !0);
  }
  draw(t) {
    const e = ae;
    if (Fa == null)
      return;
    t.save(), t.globalAlpha = 0.6, t.font = "bold 16px arial";
    let n = Ml(Fa);
    t.fillStyle = "white", t.fillText(n, 16, this[e(306)].getHeight() - 16), t[e(314)]();
  }
}
function Yo() {
  const s = ["updateMatrix", "render", "camera", "style", "2602XetuEu", "handlerLayer", "_flattenList", "requestTimer", "3147228mxVSZZ", "1188VLEFXz", "dirty", "_matrixDirty", "_renderTimes", "400JuqeXk", "length", "mode", "stage", "8251726KDgWxA", "616BHRXUw", "4841112tiAoSU", "afterRender", "216387TBEyUs", "currentTime", "isIntersectRect", "renderLayerBefore", "time", "isNode", "update", "timeEnd", "localView", "54670SHgiRW", "beforeRender", "_frames", "parent", "inLinks", "renderLayer", "45PRqsqB", "visible", "_needUpdateDisplayList", "styleSystem", "displayList", "573312wUoXaD"];
  return (Yo = function() {
    return s;
  })();
}
function Ke(s, t) {
  const e = Yo();
  return (Ke = function(n, r) {
    return e[n -= 415];
  })(s, t);
}
((s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Nl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  n && i && Dl(t, e, i);
})([p("HandlerLayer")], ir.prototype, ae(315), 2), function() {
  const s = Ke, t = Yo();
  for (; ; )
    try {
      if (parseInt(s(424)) / 1 * (parseInt(s(452)) / 2) + -parseInt(s(456)) / 3 + parseInt(s(425)) / 4 + parseInt(s(442)) / 5 * (-parseInt(s(447)) / 6) + parseInt(s(423)) / 7 + -parseInt(s(419)) / 8 * (parseInt(s(427)) / 9) + parseInt(s(436)) / 10 * (parseInt(s(415)) / 11) === 669754)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
class zl {
  constructor(t) {
    const e = Ke;
    this.timeline = { currentTime: Date.now() }, this[e(422)] = t;
  }
  start() {
    const t = Ke, e = this.stage, n = this, r = e[t(453)], i = this.timeline, o = e.animationSystem;
    {
      let h = e.animationSystem.timeline.begin;
      this.timeline[t(428)] >= h && (e.camera[t(435)].mode = "painted");
    }
    const a = e[t(450)].localView[t(421)] == "painted";
    (function h() {
      const l = t;
      if (e.destroyed)
        return;
      let c = Date.now();
      i[l(428)] = c, !a && o.tick(c);
      let u = e.camera;
      u._cameraDirty && (u._updateMatrix(), e[l(433)]()), n._tickLayer(r, c);
      const d = e.getAllVisibleLayers();
      for (let f = 0; f < d.length; f++) {
        let y = d[f];
        e._showAxis && (y._axis[l(443)] = f == 0), u._cameraDirty && y._calcBackgroundPosition(), n._tickLayer(y, c);
      }
      u.clearDirty(), n[l(455)] = requestAnimationFrame(h);
    })();
  }
  renderLayerBefore(t, e) {
    const n = Ke, r = this[n(422)][n(445)];
    for (let h = 0; h < t.displayList[n(420)]; h++) {
      let l = t.displayList[h];
      l[n(437)] && l.beforeRender();
    }
    if (!(e || t instanceof ir))
      return void t[n(451)].dirty;
    const i = this.stage.camera;
    let o = t[n(454)];
    t.displayList[n(420)] = 0;
    let a = !1;
    for (let h = 0; h < o.length; h++) {
      let l = o[h];
      l[n(451)][n(416)] && (r.computeStyle(l), l[n(451)][n(416)] = !1), !l[n(417)] || !l[n(432)] || l[n(439)] instanceof z ? !a && l.isLink && (l[n(440)].length > 0 || l.outLinks.length > 0) && (a = !0) : (l.updateMatrix(), l._clearMatrixDirtyMark());
    }
    if (a)
      for (let h = 0; h < o[n(420)]; h++) {
        let l = o[h];
        l.isLink && (l.inLinks.length > 0 || l.outLinks.length > 0) && l[n(448)]();
      }
    for (let h = 0; h < o[n(420)]; h++) {
      let l = o[h];
      l._matrixDirty && (l.updateMatrix(), l._clearMatrixDirtyMark()), l.painted = !1;
      let c = l._state;
      c._isOutOfViewport = this.viewPortCut(l, t), c._needPaint = l.visible && l.parent._state._needPaint, c._needPaint && !c._isOutOfViewport && i.canSee(l) && t[n(446)].push(l);
    }
    t._displayListDirty = !1;
  }
  viewPortCut(t, e) {
    const n = Ke;
    if (e.cuttingHide == 0)
      return !1;
    let r = e.stage[n(450)].viewportRect, i = t._obb;
    return i.aabb != null && !r[n(429)](i.aabb);
  }
  _tickLayer(t, e) {
    const n = Ke;
    let r = t[n(449)];
    t._prepareRenderData();
    const i = t[n(444)];
    if (t[n(438)] != 0) {
      t.beforeRender && t.beforeRender(), this[n(430)](t, i), t._matrixDirty = !1, r.renderLayer(t);
      for (let o = 0; o < t.displayList.length; o++) {
        let a = t.displayList[o];
        a.afterRender && a.afterRender();
      }
      t[n(426)] && t[n(426)](), t[n(418)]++;
    } else if (t._requestReapint == 1 || i) {
      t._requestReapint = !1, t[n(437)] && t.beforeRender(), this.renderLayerBefore(t, i), r[n(441)](t), t[n(417)] = !1;
      for (let o = 0; o < t[n(446)][n(420)]; o++) {
        let a = t.displayList[o];
        a[n(426)] && a[n(426)]();
      }
      t[n(426)] && t.afterRender(), t[n(418)]++;
    }
  }
  pause() {
    cancelAnimationFrame(this.requestTimer);
  }
}
const Le = vn;
function vn(s, t) {
  const e = Xo();
  return (vn = function(n, r) {
    return e[n -= 270];
  })(s, t);
}
function Xo() {
  const s = ["28bUFJdd", "5620520vDhMdH", "107179HwkYTo", "3942222zIEGux", "18UGSASy", "dragEndHandler", "isEmpty", "35174986kWvMel", "add", "event", "6fbRtFT", "2SeukjA", "5411880mlnBkX", "unselectedHandler", "objects", "length", "578465EcoTsu", "remove", "12esohrh", "isDraging", "11964239PdWhZT", "getTopObjects", "dragHandler", "selectedHandler"];
  return (Xo = function() {
    return s;
  })();
}
(function() {
  const s = vn, t = Xo();
  for (; ; )
    try {
      if (parseInt(s(288)) / 1 + parseInt(s(273)) / 2 * (parseInt(s(289)) / 3) + parseInt(s(286)) / 4 * (-parseInt(s(278)) / 5) + parseInt(s(272)) / 6 * (parseInt(s(282)) / 7) + parseInt(s(274)) / 8 + parseInt(s(290)) / 9 * (parseInt(s(287)) / 10) + parseInt(s(293)) / 11 * (-parseInt(s(280)) / 12) === 923442)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let Ra = new DragEvent("dragstart"), jl = new DragEvent("dragend");
class _h extends ve {
  constructor() {
    const t = vn;
    super(), this[t(276)] = [], this[t(281)] = !1;
  }
  addEventListener(t, e) {
    return super.addEventListener(t, e);
  }
  hasListener(t) {
    return super.hasListener(t);
  }
  isEmpty() {
    return this.objects.length == 0;
  }
  pointeroutHandler(t) {
    const e = vn;
    this.isDraging = !1, this[e(292)]() || t.isPointerDown && this.dispatchEvent(Ra);
  }
  dragHandler(t) {
    const e = vn;
    if (this.dispatchEvent(jl), t.event instanceof MouseEvent && t[e(271)].defaultPrevented == 1)
      return;
    let n = this.getTopObjects();
    for (let r = 0; r < n[e(277)]; r++) {
      let i = n[r];
      i.draggable && i[e(284)](t);
    }
  }
  [Le(291)](t) {
    const e = Le;
    this.dispatchEvent(Ra);
    let n = this.getTopObjects();
    for (let r = 0; r < n.length; r++) {
      let i = n[r];
      i.draggable && i[e(291)](t);
    }
  }
  [Le(283)]() {
    let t = this.objects, e = ct.flatten(t);
    return e = ct.flatten(t, (n) => !e.includes(n.parent)), e;
  }
  addAll(t) {
    const e = Le;
    for (let n = 0; n < t.length; n++) {
      let r = t[n];
      this.objects.includes(r) || (r.selectedHandler && r.selectedHandler(), this[e(276)].push(r));
    }
    return this;
  }
  [Le(270)](t) {
    const e = Le;
    return this.objects.includes(t) || (t[e(285)].call(t), this.objects.push(t)), this;
  }
  remove(t) {
    const e = Le;
    return t.unselectedHandler && t.unselectedHandler(), me[e(279)](this[e(276)], t), this;
  }
  removeAll() {
    const t = Le;
    let e = this[t(276)];
    for (let n = 0; n < e.length; n++) {
      let r = e[n];
      r.unselectedHandler && r[t(275)]();
    }
    return this[t(276)].length = 0, this;
  }
  has(t) {
    return this.objects.includes(t);
  }
}
const P = Ce;
function Ce(s, t) {
  const e = Go();
  return (Ce = function(n, r) {
    return e[n -= 128];
  })(s, t);
}
function Go() {
  const s = ["3307880FbSPPE", "style", "saveAsLocalImage", "removeAll", "setCursor", "object", "9MXKyIq", "removeLayer", "_pickUpByRect", "dropHandler", "dropTarget", "camera", "selectedGroup", "zoomBy", "setCamera", "contextmenu", "dblclickHandler", "removeEventListener", "observe", "areaBox", "hasListener", "updateZIndex", "_dragHandler", "lookAtContentCenter", "show", "hide", "destroyed", "overview", "1297362UiZhtZ", "quit", "fullscreen", "_showAxis", "destroy", "resourceSystem", "pointerEnabled", "1900568YYSJtR", "appendChild", "dragoverHandler", "previous", "_resizeObserver", "displayList", "_resizeTimer", "clientWidth", "type", "src", "zIndex", "_forceUpdate", "rect", "render", "serializeable", "drag", "length", "createElement", "7lqJDhq", "getCurrentLayer", "height", "animationSystem", "536520tJxERt", "dropAllowed", "showDebugPanel", "domElement", "pointermoveHandler", "dyInWorld", "isNode", "preventDefault", "dispatchEvent", "default", "mode", "autoAdjustChildrenSize", "inputSystem", "styleSystem", "addAll", "fullWindow", "isDraging", "innerHTML", "push", "92320bCsNVK", "setMode", "_obb", "addEventListener", "normal", "saveImageInfo", "pointerupHandler", "handlerLayer", "cancelAll", "map", "aabb", "_init", "debugPanel", "getAABB", "removeChild", "batchLoadAndConvertImages", "localView", "pointeroutHandler", "pointerenterHandler", "canvas", "Roots", "getCursor", "mouseoverHandler", "ResizeObserver", "exportSystem", "Resources", "update", "SerializeType is not Stage", "touchsCount", "96ZuCsCr", "catch", "relative", "Layer_", "serializerSystem", "toDataURL", "addLayer", "column", "indexOf", "width", "visible", "name", "config", "resize", "lookAt", "grabbing", "renderSystem", "target", "slice", "viewLayers", "1196520PlfTWi", "markDirty", "Stage", "ownerLayer", "4224czdpmd", "fullScreen", "dxInWorld", "wheelHandler", "hideDebugPanel", "setAttribute"];
  return (Go = function() {
    return s;
  })();
}
(function() {
  const s = Ce, t = Go();
  for (; ; )
    try {
      if (-parseInt(s(236)) / 1 + -parseInt(s(217)) / 2 + -parseInt(s(154)) / 3 * (parseInt(s(130)) / 4) + parseInt(s(150)) / 5 + parseInt(s(188)) / 6 + parseInt(s(213)) / 7 * (-parseInt(s(195)) / 8) + parseInt(s(166)) / 9 * (parseInt(s(160)) / 10) === 154376)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Zn extends sn {
  constructor(t, e) {
    super(t, e);
  }
}
class or extends ve {
  constructor(t, e) {
    const n = Ce;
    super(), this.version = Rs, this.viewLayers = [], this.visible = !1, this.enableContextmenu = !1, this.mode = n(240), this.destroyed = !1, this[n(191)] = !1, this.rect = new O(0, 0, 1, 1), this.config = { dropAllowed: !0 }, e != null && Object.assign(this[n(142)], e), this[n(171)] = new wh(this), this.handlerLayer = new ir(this), this[n(229)] = new ph(this), this.keyboard = new dh(this), this.selectedGroup = new _h(), this.resourceSystem = ft, this._init(t), this.styleSystem = new gh(this), this[n(216)] = new el(), this.effectSystem = new dl(this, this.animationSystem), this.graphSystem = new Ln(), this.layoutSystem = new fh(this.animationSystem, this.graphSystem), this[n(146)] = new zl(this), this.exportSystem = new Al(this), this[n(134)] = new Ms(this);
    const r = this;
    this[n(193)].addEventListener("loaded", (i) => {
      r.update();
    }), this.camera._updateMatrix(), this[n(230)].start(), this.renderSystem.start();
  }
  getRect() {
    const t = Ce;
    return this.rect[t(139)] = this[t(139)], this.rect.height = this[t(215)], this[t(207)];
  }
  [P(247)](t) {
    const e = P;
    let n = this;
    document.addEventListener(e(175), function(i) {
      const o = e;
      n.inputSystem.isPointerOn && i[o(224)]();
    }), n[e(220)] = function(i) {
      const o = P;
      if (typeof i == "string" && (i = document.getElementById(i)) == null)
        throw new Error("element is not found id:" + i);
      if (i == null)
        throw new Error("the dom element is null.");
      return Object.assign(i[o(161)], { display: "flex", position: o(132), flexDirection: o(137) }), i;
    }(t);
    const r = document[e(212)]("div");
    r.classList.add("layer_container"), r[e(159)](e(161), "position:relative;flex:1;width:100%;-webkit-user-select:none;"), n.layersContainer = r, n[e(220)][e(196)](r), n[e(139)] = r.offsetWidth, n.height = r.clientHeight;
    {
      const i = this.handlerLayer.render.canvas;
      i.style.zIndex = "" + this.handlerLayer.zIndex, this.layersContainer.appendChild(i);
    }
    this[e(228)](), n.debugPanel = new fl(n), rn.isDebug && n.debugPanel[e(184)]();
  }
  autoAdjustChildrenSize() {
    const t = P;
    let e = this;
    const n = e.layersContainer;
    if (window[t(259)]) {
      const i = new ResizeObserver((o) => {
        Ha(e, n[t(202)], n.clientHeight);
      });
      return i[t(178)](n), void (e[t(199)] = i);
    }
    let r = setInterval(function() {
      const i = t;
      let o = n.offsetWidth, a = n.offsetHeight;
      (e.width != o || e[i(215)] != a) && Ha(e, o, a);
    }, 500);
    e._resizeTimer = r;
  }
  [P(219)]() {
    this.debugPanel.show();
  }
  [P(158)]() {
    this[P(248)].hide();
  }
  showOverview(t) {
    const e = P;
    let n = this;
    n.overview == null && (n[e(187)] = new Cl(n)), n[e(187)].setStyles(t), n[e(187)].show();
  }
  _updateOverview() {
    this[P(187)] != null && this.overview.update();
  }
  hideOverview() {
    const t = P;
    this.overview != null && this.overview[t(185)]();
  }
  [P(136)](t) {
    const e = P;
    if (this.viewLayers.length >= tt.MaxLayerCount)
      throw new Error("out of max layer count");
    t[e(143)](this.width, this.height), t[e(141)] == null && (t.name = e(133) + t.zIndex), this.viewLayers.push(t);
    const n = t.render.canvas;
    n.style.zIndex = "" + t[e(205)], this.layersContainer.appendChild(n), this.updateZIndex(), t._onMound(this);
  }
  [P(181)]() {
    const t = P;
    this._currentLayer = null;
    const e = this.viewLayers;
    e[t(211)] !== 0 && e.forEach((n) => {
      n.render.canvas.style.zIndex = "" + n.zIndex, n.visible && (this._currentLayer = n);
    });
  }
  [P(167)](t) {
    const e = P;
    t[e(208)].canvas.remove();
    let n = this.viewLayers[e(138)](t);
    return n == -1 || (me.removeAt(this.viewLayers, n), t.stage = null), this;
  }
  removeChild(t) {
    return this[P(167)](t);
  }
  show() {
    const t = P;
    return this[t(171)][t(151)](), this.viewLayers.forEach(function(e) {
      e[t(184)]();
    }), this.resourceSystem.whenAllLoaded();
  }
  hide() {
    this.viewLayers.forEach(function(t) {
      t[Ce(185)]();
    });
  }
  update() {
    this.editor && this.editor.update(), this.handlerLayer.update(), this.viewLayers.forEach(function(t) {
      t[Ce(262)]();
    });
  }
  _forceUpdate() {
    this.handlerLayer._forceUpdate(), this.viewLayers.forEach(function(t) {
      t[Ce(206)]();
    });
  }
  toDataURL() {
    const t = P;
    return this.exportSystem[t(135)](this.viewLayers);
  }
  [P(241)]() {
    const t = P;
    return this.exportSystem.saveImageInfo(this[t(149)]);
  }
  [P(162)]() {
    this[P(260)].saveAsLocalImage(this.viewLayers);
  }
  [P(239)](t, e) {
    return super[P(239)](t, e);
  }
  removeEventListener(t, e) {
    return super[P(177)](t, e);
  }
  [P(180)](t) {
    return super.hasListener(t);
  }
  fullWindow() {
    const t = P;
    if (this.hasListener("fullwindow")) {
      let e = new Zn("fullwindow", { cancelable: !0 });
      if (this.dispatchEvent(e), e.defaultPrevented == 1)
        return;
    }
    We[t(232)](this.domElement);
  }
  [P(155)]() {
    const t = P;
    if (this.hasListener(t(190))) {
      let e = new Zn("fullscreen", { cancelable: !0 });
      this[t(225)](e);
    }
    We[t(155)](this[t(220)]);
  }
  [P(237)](t) {
    const e = P;
    if (this.hasListener("modechange")) {
      let n = new Zn("modechange", { cancelable: !0, mode: t });
      if (this.dispatchEvent(n), n.defaultPrevented == 1)
        return;
    }
    this.mode = t, t == Zt[e(210)] ? this.setCursor(at.grab) : this.setCursor(at[e(226)]);
  }
  dropHandler(t) {
  }
  [P(197)]() {
  }
  [P(258)]() {
  }
  pointerdownHandler(t) {
    const e = P, n = this.inputSystem;
    if (this.mode == Zt.drag)
      return void this.setCursor(at.grabbing);
    let r = this[e(229)].target;
    if (r != null)
      return void n.pickObject(r);
    !(t.ctrlKey || t.metaKey) && this.selectedGroup.removeAll();
  }
  static findDropToObjec(t, e) {
    const n = P;
    let r = ls._getAncestors(t), i = ct.flatten(t.children);
    for (let o = e.length - 1; o >= 0; o--) {
      let a = e[o];
      if (t !== a && a !== t.parent && a[n(218)] && r.indexOf(a) == -1 && i.indexOf(a) == -1 && a[n(238)][n(246)].containsRect(t._obb.aabb))
        return a;
    }
    return null;
  }
  _dragHandler(t) {
    const e = P, n = this[e(229)], r = this.handlerLayer, i = this[e(227)], o = this.inputSystem.target, a = this.selectedGroup, h = t.buttons == 1, l = h && o != null && o.pointerEnabled && o.draggable, c = this.viewLayers.filter((u) => u.pointerEnabled);
    if (h && this[e(142)].dropAllowed && l && o.draggable) {
      let u = null;
      for (let d = 0; d < c.length; d++) {
        const f = c[d][e(200)].filter((y) => y[e(223)]);
        u = or.findDropToObjec(o, f), u !== n.dropTarget && n[e(170)] && n.dropTarget.dragoutHandler(n), u != null && u.dragoverHandler(this.inputSystem);
      }
      n.dropTarget = u;
    }
    if (l && this.mode !== Zt.drag)
      return void a.dragHandler(n);
    !h || i != Zt.select && i != Zt.edit ? (this[e(164)](at[e(145)]), this[e(171)]._dragWith(n[e(156)], n[e(222)])) : function(u) {
      const d = P;
      let f = u.stage, y = u.showAreaBox(), I = u.stage.viewLayers;
      for (let x = 0; x < I.length; x++) {
        let m = I[x];
        if (!m.hasChildren())
          continue;
        let b = f.camera.toWorldRect(y), _ = m[d(168)](b);
        f.selectedGroup[d(231)](_), _.length > 0 && m.update();
      }
    }(r);
  }
  pointerupHandler(t) {
    const e = P, n = this.inputSystem, r = this.viewLayers, i = n.isRightButton;
    this.handlerLayer.pointerupHandler();
    for (let a = 0; a < r.length; a++) {
      const h = r[a];
      h.draggable && n[e(233)] && h.dragEndHandler(n);
    }
    if (this.mode == Zt[e(210)])
      return void this[e(164)](at.grab);
    this.setCursor("default");
    let o = this.inputSystem.target;
    o && o.pointerEnabled && (o[e(242)](n), n[e(198)].isDraging && o.draggable && i == 0 && this[e(172)].dragEndHandler(n)), this[e(142)].dropAllowed && n.dropTarget && (n[e(170)][e(169)](n), n.dropTarget = null);
  }
  [P(253)](t) {
    const e = P, n = this.inputSystem;
    this.handlerLayer[e(253)](n), this.selectedGroup[e(253)](n);
  }
  clickHandler(t) {
    const e = this.inputSystem;
    let n = e.target;
    n && !e.previous.isDragEnd && n.clickHandler(e);
  }
  [P(176)](t) {
    const e = P, n = this.inputSystem;
    let r = n[e(147)];
    r && !n[e(198)].isDragEnd && r.dblclickHandler(n);
  }
  [P(221)](t) {
    const e = P, n = this[e(229)];
    if (n.touchWheel[e(129)] > 1)
      return void (this.handlerLayer[e(179)][e(153)] && this.handlerLayer.areaBox.removeFromParent());
    if (n.isDraging)
      return this[e(182)](t);
    if (this.mode == Zt.drag)
      return void this.setCursor(at.grab);
    if (n.skipPointerMovePicking)
      return;
    let r = n.preMouseoverTarget, i = n.mouseoverTarget;
    r !== i && r != null && r[e(253)] && r.pointeroutHandler(n), i != null && (r !== i ? i.pointerenterHandler && i.pointerenterHandler(n) : (i.title != null && (this[e(243)][e(208)][e(255)].title = i.title), i[e(221)](n)));
  }
  [P(157)](t) {
    const e = P;
    if (this[e(214)]() == null || this.camera.enableWheelZoom == 0)
      return;
    let n = this[e(229)].xInWorld, r = this.inputSystem.yInWorld;
    t.deltaY < 0 ? this.camera.zoomBy(this.camera.zoomInFactor, n, r) : this.camera[e(173)](this[e(171)].zoomOutFactor, n, r);
  }
  [P(254)](t) {
  }
  _pickUpViewLayers() {
    const t = P;
    let e = this.viewLayers, n = this.camera;
    for (let r = e.length - 1; r >= 0; r--) {
      let i = e[r];
      if (!i[t(140)] || !i[t(194)])
        continue;
      let o = i._pickUp();
      if (o != null && o !== n.localView[t(165)])
        return o;
    }
    return null;
  }
  [P(257)]() {
    return this.handlerLayer.render.getCursor();
  }
  setCursor(t) {
    return this[P(243)].render.setCursor(t);
  }
  download(t, e) {
    return this.exportSystem.download(t, e);
  }
  select(t) {
    const e = P;
    this.selectedGroup[e(163)](), this.selectedGroup.addAll(t);
  }
  getCurrentLayer() {
    return this._currentLayer;
  }
  getAABB() {
    const t = P;
    if (this.viewLayers.length == 0)
      return new O(0, 0, this[t(139)], this[t(215)]);
    let e = this.viewLayers[t(245)]((n) => this.camera.toScreenRect(n[t(249)]()));
    return O.unionRects(e);
  }
  getAllVisibleLayers() {
    const t = P;
    return this.viewLayers.filter((e) => e[t(140)]);
  }
  getCenter() {
    const t = P;
    return { x: 0.5 * this.width, y: 0.5 * this[t(215)] };
  }
  [P(174)](t) {
    this.camera = t;
  }
  toJSON() {
    return Bs(this, this.viewLayers.filter((t) => t.serializeable), null, "Stage");
  }
  toJSONWithBase64() {
    const t = P;
    let e = Bs(this, this.viewLayers.filter((o) => o[t(209)]), null, t(152)), n = e[t(261)] || [], r = [], i = [];
    return n.filter((o) => o.type == "img").map((o, a) => {
      const h = t;
      r.push(o[h(204)]), i[h(235)](a);
    }), new Promise((o, a) => {
      const h = t;
      qn[h(251)](r).then((l) => {
        const c = h;
        for (let u = 0; u < l.length; u++)
          n[i[u]][c(204)] = l[u];
        o(e);
      })[h(131)](a);
    });
  }
  fromJSON(t, e) {
    const n = P;
    if (t[n(256)][n(211)] > 1 && t.SerializeType != n(152))
      throw new Error(n(128));
    this[n(171)].localView[n(189)](), this.animationSystem[n(244)]();
    let r = this.viewLayers[n(148)]();
    for (let h = 0; h < r[n(211)]; h++) {
      let l = r[h];
      this[n(250)](l), l.destroy();
    }
    const i = this;
    function o() {
      const h = n;
      let l = ks(i, t, e);
      for (let c = 0; c < l.length; c++) {
        let u = l[c];
        i.addLayer(u), u.show();
      }
      i.styleSystem.markDirty(), i._forceUpdate(), i[h(171)].zoom(1), i[h(171)][h(144)](0, 0), i[h(171)][h(183)](), i.camera[h(252)][h(189)](), setTimeout(() => {
        i.styleSystem.markDirty();
      }, 20);
    }
    let a = (t.Resources || []).filter((h) => h[n(203)] == "img").map((h) => h.src);
    return new Promise((h, l) => {
      if (a[n(211)] == 0)
        return o(), void h(!0);
      ft.whenAllImagesLoaded(a).then(() => {
        o(), h(!0);
      }).catch((c) => {
        l(c);
      });
    });
  }
  showAxis() {
    return this._showAxis = !0, this;
  }
  hideAxis() {
    return this[P(191)] = !1, this;
  }
  _reloadTest() {
    return this.toJSONWithBase64().then((t) => this.fromJSON(t));
  }
  [P(192)](t) {
    const e = P;
    if (this.destroyed)
      throw new Error("Stage has been destroyed already.");
    this[e(186)] = !0, this[e(199)] && this._resizeObserver.disconnect(), this[e(201)] && clearInterval(this._resizeTimer), this.handlerLayer[e(192)](), this[e(149)].forEach((n) => {
      n[e(192)]();
    }), this.domElement[e(234)] = "", t != 0 && ft.clearCache();
  }
}
function Ha(s, t, e) {
  const n = P;
  s.width = t, s.height = e, s.halfWidth = 0.5 * t, s.halfHeight = 0.5 * e, s[n(243)]._updateRenderSize(t, e), s.viewLayers.forEach(function(i) {
    i._updateRenderSize(t, e);
  }), s.camera.markDirty();
  let r = new Zn("resize");
  s.dispatchEvent(r);
}
var yr = qo;
(function() {
  for (var s = qo, t = Vo(); ; )
    try {
      if (parseInt(s(475)) / 1 + parseInt(s(477)) / 2 + -parseInt(s(483)) / 3 + parseInt(s(480)) / 4 * (parseInt(s(476)) / 5) + -parseInt(s(472)) / 6 + parseInt(s(473)) / 7 * (-parseInt(s(478)) / 8) + parseInt(s(482)) / 9 === 376466)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Wl = Object.defineProperty, Fl = Object.getOwnPropertyDescriptor, Ua = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Fl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Wl(t, e, i), i;
};
function Vo() {
  var s = ["1796733XKUTli", "1715778UNEONW", "setRadius", "3173424LcBlNh", "7uOotch", "height", "679402DeiRgL", "355bOSrii", "1423980IGpGXL", "4937552YrgjcP", "max", "28364VnuObU", "getLocalPoint"];
  return (Vo = function() {
    return s;
  })();
}
function qo(s, t) {
  var e = Vo();
  return (qo = function(n, r) {
    return e[n -= 471];
  })(s, t);
}
class jr extends E {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i), this._width = r, this._height = i;
  }
  [yr(471)](t = 1) {
    this.width = 2 * t, this.height = 2 * t;
  }
  [yr(481)](t, e = 0) {
    if (this._drawContentDesc.hasBorder)
      return super.getLocalPoint(t, 0);
    let n = t * (2 * Math.PI), r = this._drawContentDesc.shapeSize;
    return { x: 0.5 * r.width * Math.cos(n), y: 0.5 * r.height * Math.sin(n) };
  }
  set radius(t) {
    this.width = 2 * t, this.height = 2 * t;
  }
  get radius() {
    var t = yr;
    return 0.5 * Math[t(479)](this.width, this[t(474)]);
  }
}
function Zo() {
  const s = ["cancelLoadByObject", "1YrnKgf", "image", "86290cPDLqp", "resizeToFitImage", "_fromJSON", "defineProperty", "1478873cEFmHX", "indexImage", "8tSWUMn", "imageObject", "_strokeAndFill", "1081073BgaNfD", "2724132viFPSM", "resize", "toLowerCase", "_imgRaw", "isGIF", "string", "dirty", "src", "setImage", "width", "5gMTlxn", "_imageSrc", "3171942dzSOwK", "2645996aJsLGt", "2014178QcyDHB", "objCache", "_toJSON", "837qziBSi", "12kEcPuz", "_drawBackgroundOrBorder"];
  return (Zo = function() {
    return s;
  })();
}
Ua([p("EllipseNode")], jr.prototype, "className", 2), Ua([p(as.getShape("Ellipse"))], jr.prototype, "_shape", 2);
const Pt = ar;
function ar(s, t) {
  const e = Zo();
  return (ar = function(n, r) {
    return e[n -= 121];
  })(s, t);
}
(function() {
  const s = ar, t = Zo();
  for (; ; )
    try {
      if (parseInt(s(152)) / 1 * (-parseInt(s(145)) / 2) + parseInt(s(143)) / 3 + parseInt(s(144)) / 4 * (parseInt(s(141)) / 5) + parseInt(s(131)) / 6 + -parseInt(s(130)) / 7 * (-parseInt(s(127)) / 8) + -parseInt(s(148)) / 9 * (parseInt(s(121)) / 10) + parseInt(s(125)) / 11 * (parseInt(s(149)) / 12) === 652131)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Rl = Object[Pt(124)], Hl = Object.getOwnPropertyDescriptor;
class us extends E {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  get image() {
    return this[Pt(134)];
  }
  set image(t) {
    const e = Pt;
    this[e(134)] = t, this[e(139)](t);
  }
  get imageSrc() {
    return this._imageSrc;
  }
  set imageSrc(t) {
    this.setImage(t), this._imageSrc = t;
  }
  [Pt(129)](t) {
    const e = Pt;
    let n = this._drawContentDesc;
    t.save(), (n.hasBorder || n.hasBackgroundColor) && this[e(150)](t), this.imageObject != null && this._drawImage(t, this[e(128)]), t.restore();
  }
  _drawImage(t, e) {
    const n = Pt;
    let r = this._drawContentDesc.shapeSize;
    t.drawImage(e, 0.5 * -r.width, 0.5 * -r.height, r[n(140)], r.height);
  }
  setImage(t, e = !1) {
    const n = Pt;
    ft[n(151)](this), this._imgRaw = t;
    let r = this;
    return typeof t == "string" && (t = t.trim()), new Promise((i, o) => {
      const a = n;
      (t == null || t == "") && (this._imageSrc = null, this.imageObject = null, r.style.dirty = !0, i(null)), typeof t == a(136) && ft.loadImageWithObj(this, t, function(h) {
        const l = a;
        h != null ? (r[l(142)] = h.getAttribute(l(138)), r[l(128)] = h, r._imageSrc[l(133)]().endsWith("gif") && (h[l(135)] = !0), e == 1 && r.resize(h.width, h.height), r.style[l(137)] = !0, i(r.imageObject)) : i(null);
      }), t instanceof HTMLImageElement && (r._imageSrc = t.getAttribute("src"), r.imageObject = t, e == 1 && r[a(132)](t[a(140)], t.height), r.style.dirty = !0, i(r.imageObject));
    });
  }
  [Pt(122)]() {
    const t = Pt;
    return this.imageObject != null && this.resize(this[t(128)][t(140)], this.imageObject.height), this;
  }
  getImageObject() {
    const t = this;
    return new Promise((e, n) => {
      const r = ar;
      if (t.imageObject != null)
        return void e(t[r(128)]);
      let i = ft[r(146)].get(t);
      i != null ? i.next = function(o) {
        e(o);
      } : n(null);
    });
  }
  _beforeToJSON(t) {
    const e = Pt;
    super._beforeToJSON(t), this.imageObject != null && t[e(126)](this.imageObject);
  }
  _toJSON(t) {
    const e = Pt;
    let n = super[e(147)](t);
    if (t != null) {
      let r = t.resourcesIndexMap;
      if (this[e(128)] != null) {
        let i = r.get(this.imageObject);
        i != null && (n.image = i);
      }
    }
    return n;
  }
  [Pt(123)](t) {
    const e = Pt;
    if (super[e(123)](t), t.objJson.image != null) {
      let n = t.resourcesArr[t.objJson[e(153)]];
      n && n.type == "img" && (this.imageSrc = n.src);
    }
  }
  destroy() {
    const t = Pt;
    super.destroy(), this[t(128)] = null, this._imgRaw = null;
  }
}
((s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Hl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  n && i && Rl(t, e, i);
})([p("ImageNode")], us.prototype, "className", 2);
var q = hr;
(function() {
  for (var s = hr, t = Ko(); ; )
    try {
      if (parseInt(s(295)) / 1 * (parseInt(s(296)) / 2) + parseInt(s(275)) / 3 + parseInt(s(268)) / 4 + parseInt(s(287)) / 5 + -parseInt(s(289)) / 6 + -parseInt(s(278)) / 7 * (parseInt(s(292)) / 8) + parseInt(s(265)) / 9 * (parseInt(s(284)) / 10) === 180815)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Ul = Object.defineProperty, Jl = Object.getOwnPropertyDescriptor, mr = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Jl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Ul(t, e, i), i;
};
function Ko() {
  var s = ["1434642gZUeEg", "_matrixDirty", "setVideo", "1813432bVlgcG", "drawImage", "prototype", "3ceAfJW", "142106LRWnZW", "play", "save", "ended", "dispatchEvent", "_dom", "18FWWgKS", "text", "addEventListener", "27276UYWAUX", "catch", "VideoNode", "_strokeAndFill", "isPlaying", "defineProperties", "_afterUpdateMatrix", "233856HQFCSD", "width", "_video", "7elTWyG", "hasBorder", "remove", "removeEventListener", "destroy", "pause", "1276710IXnePi", "autoplay", "height", "466645kqkXWN", "showCover"];
  return (Ko = function() {
    return s;
  })();
}
class Un extends us {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    var o = hr;
    super(), this.isPlaying = !1, this[o(266)] = t, this.x = e || 0, this.y = n || 0, this[o(276)] = r || 0, this.height = i || 0;
  }
  [q(288)]() {
    this[q(272)] = !1, this._matrixDirty = !0;
  }
  [q(297)]() {
    var t = q;
    this.isPlaying = !0, this[t(277)][t(297)]()[t(269)]((e) => {
    }), this._matrixDirty = !0;
  }
  pause() {
    var t = q;
    this.isPlaying = !1, this[t(277)].pause(), this._matrixDirty = !0;
  }
  [q(291)](t) {
    var e = q;
    const n = this;
    if (this._dom != null && (this[e(264)].remove(), this._dom = null), typeof t == "string") {
      this._videoSrc = t;
      let r = We.createVideo(t, function() {
        var i = e;
        n.autoplay && n[i(297)]();
      });
      r.addEventListener("play", function() {
        var i = e;
        n[i(263)](new sn(i(297)));
      }, !1), r.addEventListener(e(283), function() {
        n[e(263)](new sn("pause"));
      }, !1), r.addEventListener(e(262), function() {
        n[e(263)](new sn("ended"));
      }, !1), this[e(277)] = r, this._dom = this[e(277)];
    } else
      this._video = t, this._videoSrc = t.firstElementChild.getAttribute("src");
    this._video.width = this.width, this._video.height = this.height, this[e(290)] = !0;
  }
  addEventListener(t, e) {
    super[q(267)](t, e);
  }
  [q(281)](t, e) {
    super[q(281)](t, e);
  }
  [q(271)](t) {
    var e = q;
    let n = this._drawContentDesc;
    t[e(298)](), (n[e(279)] || n.hasBackgroundColor) && this._drawBackgroundOrBorder(t);
    let r = this.isPlaying ? this._video : this.imageObject;
    if (r != null) {
      let i = this._drawContentDesc.shapeSize;
      t[e(293)](r, 0.5 * -i.width, 0.5 * -i[e(286)], i.width, i.height);
    }
    t.restore();
  }
  [q(274)]() {
    var t = q;
    super._afterUpdateMatrix(), this._video != null && this._video.width != this[t(276)] && (this._video.width = this.width, this._video.height = this.height);
  }
  [q(282)]() {
    var t = q;
    super[t(282)](), this[t(264)] && this._dom[t(280)]();
  }
}
function hr(s, t) {
  var e = Ko();
  return (hr = function(n, r) {
    return e[n -= 262];
  })(s, t);
}
mr([p(q(270))], Un[q(294)], "className", 2), mr([p(!1)], Un[q(294)], "autoplay", 2), mr([p(E.prototype._serializers.concat([q(285), "videoSrc"]))], Un.prototype, "_serializers", 2), Object[q(273)](Un[q(294)], { videoSrc: { get() {
  return this._videoSrc;
}, set(s) {
  this[q(291)](s);
} } }), function() {
  for (var s = Ws, t = Qo(); ; )
    try {
      if (-parseInt(s(263)) / 1 * (parseInt(s(261)) / 2) + parseInt(s(266)) / 3 * (-parseInt(s(252)) / 4) + parseInt(s(257)) / 5 * (parseInt(s(254)) / 6) + -parseInt(s(264)) / 7 + -parseInt(s(258)) / 8 + parseInt(s(259)) / 9 + -parseInt(s(256)) / 10 * (-parseInt(s(260)) / 11) === 644214)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
var Yl = Object.defineProperty, Xl = Object.getOwnPropertyDescriptor;
function Ws(s, t) {
  var e = Qo();
  return (Ws = function(n, r) {
    return e[n -= 251];
  })(s, t);
}
class Sh extends E {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  _strokeAndFill(t) {
    var e = Ws;
    let n = this[e(255)];
    if (t.save(), (n.hasBorder || n[e(262)]) && this._drawBackgroundOrBorder(t), this.canvas != null) {
      let r = this._drawContentDesc.shapeSize;
      (this[e(251)].width != r.width || this[e(251)].height != r.height) && this.onSizeChanged(r.width, r.height), t[e(265)](this.canvas, 0.5 * -r.width, 0.5 * -r.height, r.width, r.height);
    }
    t.restore();
  }
  setCanvas(t) {
    this.canvas = t;
  }
  onSizeChanged(t, e) {
    var n = Ws;
    this.canvas != null && (this[n(251)][n(267)] = t, this.canvas[n(253)] = e);
  }
}
function Qo() {
  var s = ["_drawContentDesc", "660GmjyIk", "95DcHFZn", "9258488twRejl", "2990655rPyiAL", "368335uDxXAm", "4KmYBcm", "hasBackgroundColor", "235919ujlxuQ", "3024875kilTau", "drawImage", "146007IoczLs", "width", "canvas", "64zBzJQE", "height", "297438XHTIqt"];
  return (Qo = function() {
    return s;
  })();
}
((s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Xl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  n && i && Yl(t, e, i);
})([p("CanvasNode")], Sh.prototype, "className", 2);
const Vt = ta;
function $o() {
  const s = ["2846264UdMupN", "setShape", "3085281CluoUV", "_updateShapeSize", "_shape", "2720voqmwN", "restore", "_isTextBlank", "drawShape", "set", "2946054RsTkri", "defineProperty", "1euKIld", "15983CFPDoO", "vertices", "hasBorder", "8412VGnjvH", "lineWidth", "_matrixDirty", "54807576uZnfQi", "35CTzTsl", "_strokeAndFill", "699Uuqpsj", "shapeIndexMap", "5kVQuMr", "shape", "get", "objJson", "2463344vsKIoT", "worldToLocalXY", "isClosed", "_drawContentDesc", "_toJSON"];
  return ($o = function() {
    return s;
  })();
}
(function() {
  const s = ta, t = $o();
  for (; ; )
    try {
      if (parseInt(s(478)) / 1 * (-parseInt(s(466)) / 2) + -parseInt(s(488)) / 3 * (-parseInt(s(482)) / 4) + parseInt(s(490)) / 5 * (-parseInt(s(476)) / 6) + -parseInt(s(486)) / 7 * (parseInt(s(494)) / 8) + -parseInt(s(468)) / 9 + parseInt(s(471)) / 10 * (-parseInt(s(479)) / 11) + parseInt(s(485)) / 12 === 865541)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Gl = Object[Vt(477)], Vl = Object.getOwnPropertyDescriptor, Ir = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Vl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Gl(t, e, i), i;
};
function ta(s, t) {
  const e = $o();
  return (ta = function(n, r) {
    return e[n -= 464];
  })(s, t);
}
class Cs extends E {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  get shape() {
    return this._shape;
  }
  set shape(t) {
    t !== this._shape && (this._matrixDirty = !0), this._shape = t;
  }
  setShape(t) {
    const e = Vt;
    this._shape = t, this[e(484)] = !0;
  }
  hitTest(t, e) {
    const n = Vt;
    if (!this[n(473)]() && this._getTextAABB().contains(t, e))
      return !0;
    if (!this._obb.aabb.contains(t, e))
      return !1;
    if (!this[n(464)].hasBorder && this[n(470)] instanceof ee) {
      let r = this[n(495)](t, e), i = this._localToNormal(r.x, r.y);
      if (this[n(470)][n(496)])
        return ht.isPointInPolygon(i, this._shape[n(480)]);
      let o = Math.max(this._pickPrecision, this._computedStyle[n(483)] || 1), a = this._localToNormal(o, 0).x;
      return Ht.isPointOnLineSegs(i, this._shape.vertices, !1, a);
    }
    return ht.isPointInPolygon({ x: t, y: e }, this._obb.points);
  }
  _getOBBPoints() {
    const t = Vt;
    if (this._shape instanceof ee) {
      this[t(469)]();
      let e = this[t(464)].shapeSize, n = 0.5 * e.width, r = 0.5 * e.height;
      return this._shape[t(480)].map((i, o) => ({ x: i.x * n, y: i.y * r }));
    }
    return super._getOBBPoints();
  }
  [Vt(487)](t) {
    const e = Vt;
    let n = this._drawContentDesc;
    t.save(), (n[e(481)] || n.hasBackgroundColor) && this._drawBackgroundOrBorder(t), this.drawShape(t), t[e(472)]();
  }
  [Vt(474)](t) {
    this._shape.draw(t, this);
  }
  _beforeToJSON(t) {
    const e = Vt;
    super._beforeToJSON(t);
    let n = this.shape;
    if (t[e(489)].get(n) == null) {
      let r = t.shapes.length;
      t.shapeIndexMap[e(475)](n, r), t.shapes.push(n.toJSON());
    }
  }
  [Vt(465)](t) {
    const e = Vt;
    let n = super._toJSON(t);
    if (t != null) {
      let r = t.shapeIndexMap;
      if (this._shape != null) {
        let i = r[e(492)](this._shape);
        n[e(491)] = i;
      }
    }
    return n;
  }
  _fromJSON(t) {
    const e = Vt;
    if (super._fromJSON(t), t[e(493)].shape != null) {
      let n = t.shapeIndexMap.get(t[e(493)].shape);
      this[e(467)](n);
    }
  }
}
Ir([p("ShapeNode")], Cs.prototype, "className", 2), Ir([p(as.getShape("Rect"))], Cs.prototype, "_shape", 2), Ir([p(3)], Cs.prototype, "_pickPrecision", 2);
const Rt = ea;
(function() {
  const s = ea, t = na();
  for (; ; )
    try {
      if (-parseInt(s(407)) / 1 + parseInt(s(421)) / 2 * (parseInt(s(414)) / 3) + -parseInt(s(402)) / 4 + -parseInt(s(416)) / 5 + parseInt(s(398)) / 6 + -parseInt(s(409)) / 7 * (-parseInt(s(406)) / 8) + parseInt(s(395)) / 9 * (parseInt(s(403)) / 10) === 608378)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var ql = Object[Rt(412)], Zl = Object[Rt(418)], Ja = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Zl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && ql(t, e, i), i;
};
function ea(s, t) {
  const e = na();
  return (ea = function(n, r) {
    return e[n -= 394];
  })(s, t);
}
class Wr extends E {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  _strokeAndFill(t) {
    const e = Rt;
    let n = this[e(400)];
    t[e(411)](), (n[e(417)] || n[e(420)]) && this[e(413)](t), this.imageObject != null && this._drawImage(t, this.imageObject), t.restore();
  }
  _drawImage(t, e) {
    const n = Rt;
    let r = this[n(400)][n(419)];
    t.drawImage(e, 0.5 * -r.width, 0.5 * -r.height, r[n(423)], r.height);
  }
  setHtml(t) {
    const e = Rt;
    t !== this[e(401)] && (this[e(401)] = t, this[e(394)]());
  }
  [Rt(394)]() {
    const t = Rt;
    if (this.imageObject == null) {
      let r = new Image();
      this.imageObject = r;
    }
    let e = this[t(400)].shapeSize, n = function(r, i, o, a) {
      const h = Rt;
      let l = '<svg width="' + i + h(408) + o + '" viewBox="0 0 ' + i + " " + o + h(405) + a + "</body></html></foreignObject></svg >";
      const c = encodeURIComponent(l)[h(396)](/'/g, "%27")[h(396)](/"/g, "%22");
      return h(397) + c;
    }(this._html, e[t(423)], e[t(415)], this[t(401)]);
    this.imageObject.onload = () => {
      this._matrixDirty = !0;
    }, this.imageObject.src = n;
  }
  _afterUpdateMatrix() {
    const t = Rt;
    if (super._afterUpdateMatrix(), this.imageObject == null)
      return;
    let e = this[t(400)][t(419)];
    (this[t(410)][t(423)] !== e.width || this.imageObject.height !== e.height) && this[t(394)]();
  }
  get html() {
    return this._html;
  }
  set html(t) {
    t !== this._html && this.setHtml(t);
  }
}
function na() {
  const s = ["_html", "4361992ACIdlt", "141650ZZNshf", "concat", '" xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"><html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><style>body{margin:0;padding:0;}</style>', "3667648IfEzLE", "220555zkITsC", '" height="', "14FpBete", "imageObject", "save", "defineProperty", "_drawBackgroundOrBorder", "1073541BNckZU", "height", "3036320wjEVDd", "hasBorder", "getOwnPropertyDescriptor", "shapeSize", "hasBackgroundColor", "2uwnCSz", "html", "width", "_updateImage", "567BJRJCq", "replace", "data:image/svg+xml;charset=UTF-8,", "2157246AepeNP", "prototype", "_drawContentDesc"];
  return (na = function() {
    return s;
  })();
}
Ja([p("HtmlNode")], Wr[Rt(399)], "className", 2), Ja([p(E.prototype._serializers[Rt(404)]([Rt(422)]))], Wr.prototype, "_serializers", 2);
var gn = ps;
(function() {
  for (var s = ps, t = sa(); ; )
    try {
      if (parseInt(s(212)) / 1 + parseInt(s(201)) / 2 * (-parseInt(s(216)) / 3) + -parseInt(s(213)) / 4 + -parseInt(s(202)) / 5 * (-parseInt(s(199)) / 6) + -parseInt(s(205)) / 7 * (-parseInt(s(203)) / 8) + parseInt(s(214)) / 9 * (parseInt(s(204)) / 10) + parseInt(s(217)) / 11 * (-parseInt(s(209)) / 12) === 947863)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Kl = Object.defineProperty, Ql = Object.getOwnPropertyDescriptor, ws = (s, t, e, n) => {
  for (var r, i = ps, o = n > 1 ? void 0 : n ? Ql(t, e) : t, a = s[i(200)] - 1; a >= 0; a--)
    (r = s[a]) && (o = (n ? r(t, e, o) : r(o)) || o);
  return n && o && Kl(t, e, o), o;
};
function sa() {
  var s = ["_serializers", "1465098IrFsse", "102484dRdZVz", "171bHarqh", "prototype", "72nBNMPR", "37807LlvuZL", "className", "11226pLXwLx", "length", "89328giltar", "4325PoySQQ", "120hSSDdr", "451910vYljDN", "560007Cctygs", "middle", "_direction", "direction", "10812trnSNN", "concat"];
  return (sa = function() {
    return s;
  })();
}
function ps(s, t) {
  var e = sa();
  return (ps = function(n, r) {
    return e[n -= 199];
  })(s, t);
}
class Jn extends z {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  getSegmentCount() {
    return 2;
  }
  _updatePoints() {
    var t = ps;
    const e = this._calcAZ(), n = e[0], r = e[1];
    let i;
    i = n.x == r.x || n.y == r.y ? C[t(206)](n, r) : this[t(208)] == Mt.horizontal ? { x: r.x, y: n.y } : { x: n.x, y: r.y };
    let o = this._state.points;
    return o.length = 0, o.push(n, i, r), o;
  }
  get [gn(208)]() {
    return this[gn(207)];
  }
  set direction(t) {
    this._direction = t;
  }
}
ws([p("LShapeLink")], Jn.prototype, gn(218), 2), ws([p(z.prototype[gn(211)][gn(210)](["direction"]))], Jn.prototype, "_serializers", 2), ws([p([0, 1])], Jn[gn(215)], "_middleIndex", 2), ws([p(Mt.horizontal)], Jn.prototype, "_direction", 2);
const Lt = ra;
(function() {
  const s = ra, t = ia();
  for (; ; )
    try {
      if (-parseInt(s(396)) / 1 + parseInt(s(390)) / 2 * (parseInt(s(407)) / 3) + parseInt(s(383)) / 4 * (parseInt(s(393)) / 5) + parseInt(s(386)) / 6 * (-parseInt(s(398)) / 7) + parseInt(s(406)) / 8 * (parseInt(s(401)) / 9) + parseInt(s(395)) / 10 + -parseInt(s(384)) / 11 === 379576)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var $l = Object.defineProperty, tc = Object[Lt(380)], xr = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? tc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && $l(t, e, i), i;
};
function ra(s, t) {
  const e = ia();
  return (ra = function(n, r) {
    return e[n -= 380];
  })(s, t);
}
function ia() {
  const s = ["prototype", "ctrlPoint", "8Zsycsn", "16326qEDMBk", "getOwnPropertyDescriptor", "push", "_preHitTest", "4pCztle", "2941499PrvSoo", "_measureDistance", "1626168apxnpu", "_updatePoints", "_getQuadBezierExtremas", "horizontal", "168dguZPK", "normalize", "getPoints", "2182435eMVaKd", "_pickPrecision", "876440QkxGxX", "326968zCMmZk", "points", "7WUsjvH", "direction", "QuadBezierLink", "2373498MJzBmY", "_serializers", "autoCalcCtrlPoint"];
  return (ia = function() {
    return s;
  })();
}
class As extends z {
  constructor(t, e, n, r, i) {
    const o = Lt;
    super(t, e, n, r, i), this[o(399)] = "horizontal";
  }
  _updatePoints() {
    const t = Lt;
    let e = this._calcAZ(), n = e[0], r = e[1], i = this.getCtrlPoint(n.x, n.y, r.x, r.y), o = this._state[t(397)];
    return o.length = 0, o.push(n, i, r), o;
  }
  translateWith(t, e) {
    const n = Lt;
    return super.translateWith(t, e), this[n(405)] != null && (this.ctrlPoint.x += t, this.ctrlPoint.y += e), this;
  }
  autoCalcCtrlPoint(t, e, n, r) {
    const i = Lt;
    let o = (t + n) / 2, a = (e + r) / 2;
    return this.direction == Mt[i(389)] ? a += (r - e) / 2 : a -= (r - e) / 2, { x: o, y: a };
  }
  getCtrlPoint(t, e, n, r) {
    const i = Lt;
    return this.ctrlPoint != null ? this[i(405)] : this[i(403)](t, e, n, r);
  }
  setCtrlPoint(t) {
    this.ctrlPoint = t, this._matrixDirty = !0;
  }
  resetCtrlPoint() {
    this.ctrlPoint = void 0, this._matrixDirty = !0;
  }
  _getOBBPoints() {
    const t = Lt;
    this[t(397)] = this[t(387)]();
    let e = this.points;
    const n = zs[t(388)](e[0], e[1], e[2]);
    if (n.length == 0)
      return e;
    let r = [e[0], e[2]];
    for (let i = 0; i < n.length; i++)
      r[t(381)](this.getPoint(n[i]));
    return r;
  }
  getPoint(t) {
    let e = this[Lt(392)](), n = e[0], r = e[1], i = e[2], o = (1 - t) * (1 - t);
    return { x: o * n.x + 2 * (1 - t) * t * r.x + t * t * i.x, y: o * n.y + 2 * (1 - t) * t * r.y + t * t * i.y };
  }
  getLocalPoint(t, e) {
    return this.getPoint(t);
  }
  _getBeginVec() {
    let t = this.points[0], e = this.getPoint(0.01), n = [t.x - e.x, t.y - e.y];
    return B.normalize(n, n);
  }
  _getEndVec() {
    const t = Lt;
    let e = this.getPoint(0.9), n = this[t(397)][this.points.length - 1], r = [n.x - e.x, n.y - e.y];
    return B[t(391)](r, r);
  }
  hitTest(t, e) {
    const n = Lt;
    if (this[n(382)](t, e))
      return !0;
    let r = this._obb.aabb, i = this.getComputedStyle().lineWidth || 0, o = Math.max(0.5 * i, this[n(394)]);
    if (!r.contains(t, e, o))
      return !1;
    let a = this.worldToLocalXY(t, e);
    return this._measureDistance(a.x, a.y).dist < o;
  }
  _measureDistance(t, e) {
    const n = Lt;
    let r = this.getPoints(), i = r[0], o = r[1], a = r[2];
    return zs[n(385)](t, e, i.x, i.y, o.x, o.y, a.x, a.y);
  }
}
xr([p(Ot[Lt(400)])], As.prototype, "className", 2), xr([p(new zs())], As[Lt(404)], "_shape", 2), xr([p(z.prototype._serializers.concat(["direction", K.ctrlPoint]))], As.prototype, Lt(402), 2);
var Fr = aa;
function oa() {
  var s = ["TipNode", "_height", "1152662rCmIHX", "_computedStyle", "603iBxMFR", "3553312WHKmfF", "2332225QxUPLY", "9920112UpNwrD", "288906sfASnH", "5CPVlzO", "195200pdiEub", "2344644TShOEb", "resizeToFitText", "4KbQLzo"];
  return (oa = function() {
    return s;
  })();
}
(function() {
  for (var s = aa, t = oa(); ; )
    try {
      if (-parseInt(s(504)) / 1 + parseInt(s(501)) / 2 * (parseInt(s(510)) / 3) + -parseInt(s(507)) / 4 + parseInt(s(511)) / 5 * (parseInt(s(513)) / 6) + -parseInt(s(508)) / 7 + parseInt(s(509)) / 8 + parseInt(s(506)) / 9 * (parseInt(s(512)) / 10) === 757067)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var ec = Object.defineProperty, nc = Object.getOwnPropertyDescriptor, vs = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? nc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && ec(t, e, i), i;
};
class Yn extends on {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i), this.originPosition = "cb";
  }
  [Fr(500)]() {
    var t = Fr;
    const e = this.arrowsSize == null ? 8 : this.arrowsSize;
    let n = this[t(505)].computePadding();
    return this._width = this._textWidth + n, this[t(503)] = this._textHeight + n + e, this;
  }
}
function aa(s, t) {
  var e = oa();
  return (aa = function(n, r) {
    return e[n -= 500];
  })(s, t);
}
function ha(s, t) {
  const e = la();
  return (ha = function(n, r) {
    return e[n -= 176];
  })(s, t);
}
vs([p(Fr(502))], Yn.prototype, "className", 2), vs([p(8)], Yn.prototype, "arrowsSize", 2), vs([p(as.getShape("Tip"))], Yn.prototype, "_shape", 2), vs([p(on.prototype._serializers.concat(["arrowsSize"]))], Yn.prototype, "_serializers", 2);
const we = ha;
(function() {
  const s = ha, t = la();
  for (; ; )
    try {
      if (parseInt(s(186)) / 1 + -parseInt(s(179)) / 2 + parseInt(s(182)) / 3 + -parseInt(s(180)) / 4 * (-parseInt(s(184)) / 5) + parseInt(s(188)) / 6 * (parseInt(s(177)) / 7) + -parseInt(s(176)) / 8 * (parseInt(s(178)) / 9) + -parseInt(s(190)) / 10 * (parseInt(s(194)) / 11) === 953477)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var sc = Object[we(193)], rc = Object.getOwnPropertyDescriptor, _s = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? rc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && sc(t, e, i), i;
};
function la() {
  const s = ["20ZPogaM", "direction", "436887EGAHnD", "prototype", "7434LqGoYY", "_direction", "160cPSSlb", "horizontal", "ZShapeLink", "defineProperty", "590986YtfBqa", "33392BlGBMf", "10549fGdmbc", "1557oKDBvH", "3026000PHoFNj", "677032kUjpIi", "endArrow", "3201309JGxZaH", "getFold2"];
  return (la = function() {
    return s;
  })();
}
class Xn extends z {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  getSegmentCount() {
    return 4;
  }
  getFold1(t, e) {
    const n = we;
    let r = (e.y - t.y) / 2, i = (e.x - t.x) / 2;
    return this._direction == Mt[n(191)] ? { x: t.x + i, y: t.y } : { x: t.x, y: t.y + r };
  }
  getFold2(t, e) {
    let n = (e.y - t.y) / 2, r = (e.x - t.x) / 2;
    return this._direction == Mt.horizontal ? { x: e.x - r, y: e.y } : { x: e.x, y: e.y - n };
  }
  _updatePoints() {
    const t = we, e = this._calcAZ(), n = e[0], r = e[1];
    let i = this.getFold1(n, r), o = this[t(183)](n, r);
    const a = [n, i, { x: (i.x + o.x) / 2, y: (i.y + o.y) / 2 }, o, r];
    if (this.points = a, this[t(181)]) {
      let h = a.length - 2;
      this.endArrow.setOriginOnLink(0, h);
    }
    return a;
  }
  get [we(185)]() {
    return this._direction;
  }
  set direction(t) {
    this[we(189)] = t;
  }
}
function nn(s, t) {
  const e = ca();
  return (nn = function(n, r) {
    return e[n -= 354];
  })(s, t);
}
_s([p(we(192))], Xn.prototype, "className", 2), _s([p(z.prototype._serializers.concat(["direction"]))], Xn[we(187)], "_serializers", 2), _s([p([1, 0.5])], Xn.prototype, "_middleIndex", 2), _s([p(Mt[we(191)])], Xn[we(187)], "_direction", 2);
const jt = nn;
(function() {
  const s = nn, t = ca();
  for (; ; )
    try {
      if (parseInt(s(368)) / 1 + parseInt(s(381)) / 2 + parseInt(s(358)) / 3 + -parseInt(s(378)) / 4 * (parseInt(s(354)) / 5) + parseInt(s(366)) / 6 * (-parseInt(s(377)) / 7) + parseInt(s(369)) / 8 * (-parseInt(s(355)) / 9) + parseInt(s(357)) / 10 === 163260)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Rr = function() {
};
function ca() {
  const s = ["gravity", "initialize", "neighbors", "log", "frame_height", "push", "177115CWOUEU", "153fzQSvE", "doLayout", "2749170VtHWqL", "37488meHdQw", "maxForceDistance", "origin", "setOriginEdgeWeight", "initNodes", "originEdges", "applyForce", "attractiveForce", "222726IIoyvm", "travel", "325637KLThHj", "141968HXBrOV", "force", "speed", "selectedNode", "nodes", "repulsiveForce", "mass", "isNode", "35wRJBkv", "28uHprfS", "_fid_", "originWeight", "570916KJQptu", "frame_width", "length"];
  return (ca = function() {
    return s;
  })();
}
Rr.prototype = { calculate: function(s, t) {
  this.dx = s.x - t.x, this.dy = s.y - t.y, this.d2 = this.dx * this.dx + this.dy * this.dy, this.d = Math.sqrt(this.d2);
} };
class ic {
  constructor(t, e, n) {
    const r = nn;
    this.originEdges = [], this.uuid = 0, this[r(382)] = e, this[r(388)] = n, this.origin = t, this[r(385)]();
    let i = this;
    ce.travel(t, function(o, a) {
      o._fid_ = ++i.uuid;
    }), this[r(362)](t);
  }
  initNodes(t) {
    const e = nn;
    let n = this;
    ce[e(367)](t, function(r, i) {
      const o = e;
      if (r[o(376)] && i != null) {
        let a = i, h = r;
        a == t && n.setOriginEdgeWeight(h, n[o(380)]);
        let l = 1 | h.mass;
        n.addNode(h, l);
        let c = 30;
        n.addLink(a, h, c);
      }
    });
  }
  initialize() {
    const t = nn;
    this.originWeight = 48, this.speed = 12, this.gravity = 50, this[t(359)] = 512, this.nodes = new Array(), this.edges = new Array(), this.originEdges = new Array();
  }
  originForce(t, e) {
    const n = nn;
    if (this[n(363)][t._fid_]) {
      if (t[n(379)] != this.selectedNode) {
        let r = this[n(363)][t._fid_], i = (e.d - r) / r;
        t.force.x += i * (e.dx / e.d), t.force.y += i * (e.dy / e.d);
      }
    } else if (t._fid_ != this[n(372)]) {
      let r = this.gravity * t[n(375)] * this[n(360)][n(375)] / e.d2, i = this[n(359)] - e.d;
      i > 0 && (r *= Math.log(i)), r < 1024 && (t.force.x -= r * e.dx / e.d, t[n(370)].y -= r * e.dy / e.d);
    }
  }
  [jt(365)](t, e, n) {
    const r = jt;
    let i = this.edges[t._fid_][e._fid_];
    if (i += 3 * (t.neighbors + e.neighbors), i) {
      let o = (n.d - i) / i;
      t[r(379)] != this.selectedNode && (t[r(370)].x -= o * n.dx / n.d, t[r(370)].y -= o * n.dy / n.d), e._fid_ != this.selectedNode && (e.force.x += o * n.dx / n.d, e.force.y += o * n.dy / n.d);
    }
  }
  [jt(374)](t, e, n) {
    const r = jt;
    let i = this[r(384)] * t.mass * e[r(375)] / n.d2, o = this.maxForceDistance - n.d;
    o > 0 && (i *= Math[r(387)](o)), i < 1024 && (t.force.x += i * n.dx / n.d, t.force.y += i * n.dy / n.d);
  }
  [jt(356)]() {
    this.applyForce();
  }
  [jt(364)]() {
    const t = jt;
    for (let e = 0; e < this[t(373)].length; e++) {
      let n = this[t(373)][e];
      for (let i = 0; i < this.nodes[t(383)]; i++)
        if (e != i) {
          let o = this[t(373)][i], a = new Rr();
          a.calculate(n, o), this.getLink(n._fid_, o._fid_) != null && this.attractiveForce(n, o, a), e != this.selectedNode && this[t(374)](n, o, a);
        }
      let r = new Rr();
      r.calculate(this.origin, n), this.originForce(n, r), n.force.x *= this[t(371)], n.force.y *= this[t(371)], n.x += n.force.x, n.y += n[t(370)].y, n[t(370)].x = 0, n.force.y = 0;
    }
  }
  bounds(t) {
    const e = jt;
    let n = t.x, r = t.x + 28, i = t.y, o = t.y + 28;
    n < 0 && (t.x = 0), i < 0 && (t.y = 0), r > this.frame_width && (t.x = this[e(382)] - 28), o > this.frame_height && (t.y = this.frame_height - 28);
  }
  [jt(361)](t, e) {
    this[jt(363)][t._fid_] = e;
  }
  addNode(t, e) {
    const n = jt;
    t.mass = 1 | e, t.neighbors = 0 | t[n(386)], t.force = { x: 0, y: 0 }, this.nodes[n(389)](t);
  }
  getLink(t, e) {
    let n = this.edges[t];
    return n == null ? null : n[e];
  }
  addLink(t, e, n) {
    const r = jt;
    !this.edges[t._fid_] && (this.edges[t._fid_] = new Object()), this.edges[t[r(379)]][e[r(379)]] = n;
    try {
      t.neighbors++, e.neighbors++;
    } catch (i) {
      console.log("Error Adding Edge: " + i);
    }
  }
}
const pt = ua;
function ua(s, t) {
  const e = pa();
  return (ua = function(n, r) {
    return e[n -= 252];
  })(s, t);
}
(function() {
  const s = ua, t = pa();
  for (; ; )
    try {
      if (parseInt(s(271)) / 1 * (-parseInt(s(273)) / 2) + parseInt(s(257)) / 3 * (parseInt(s(266)) / 4) + parseInt(s(278)) / 5 + -parseInt(s(281)) / 6 + parseInt(s(254)) / 7 + -parseInt(s(276)) / 8 + parseInt(s(268)) / 9 * (parseInt(s(282)) / 10) === 940921)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var oc = Object[pt(260)], ac = Object[pt(267)], Ss = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? ac(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && oc(t, e, i), i;
};
function pa() {
  const s = ["contains", "621496ItbxRo", "getOwnPropertyDescriptor", "790254TyXlnd", "prototype", "distance", "1obeOhU", "max", "3535822KGtgWd", "_inArcSide", "getPoints", "9203920GeOfHX", "cos", "5074165bLffUM", "_serializers", "points", "6071982nnFWuB", "330nKIPjm", "direction", "_getOBBPoints", "3449362nqkEsK", "abs", "concat", "9DwXHzE", "_shape", "lineWidth", "defineProperty", "hitTest", "atan2", "getPoint", "push"];
  return (pa = function() {
    return s;
  })();
}
class Gn extends z {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  getPoint(t) {
    const e = pt;
    let n = this[e(275)](), r = n[0], i = n[n.length - 1], o = (r.x + i.x) / 2, a = (r.y + i.y) / 2, h = r.x - i.x, l = r.y - i.y, c = Math.sqrt(h * h + l * l) / 2, u = Math.atan2(l, h), d = u + Math.PI * t;
    return this.direction === Mt.anticlockwise && (d = u - Math.PI * t), { x: o + c * Math[e(277)](d), y: a + c * Math.sin(d) };
  }
  getLocalPoint(t, e) {
    return this[pt(263)](t);
  }
  [pt(253)]() {
    const t = pt;
    this[t(280)] = this._updatePoints();
    let e = this.points[0], n = this.points[this.points.length - 1], r = [e];
    {
      let i = [], o = { x: 0.5 * (e.x + n.x), y: 0.5 * (e.y + n.y) }, a = 0.5 * C.distance(e.x, e.y, n.x, n.y);
      i.push({ x: o.x, y: o.y - a }), i.push({ x: o.x, y: o.y + a }), i.push({ x: o.x - a, y: o.y }), i[t(264)]({ x: o.x + a, y: o.y });
      for (let h = 0; h < i.length; h++)
        this._inArcSide(e, n, i[h]) && r.push(i[h]);
    }
    return r.push(n), r;
  }
  _updatePoints() {
    return this._calcAZ();
  }
  [pt(261)](t, e) {
    const n = pt;
    if (this._preHitTest(t, e))
      return !0;
    let r = this._obb.aabb, i = this.getComputedStyle()[n(259)] || 0, o = Math[n(272)](0.5 * i, this._pickPrecision);
    if (!r[n(265)](t, e, o))
      return !1;
    let a = this._obb.localPoints, h = a[0], l = a[a.length - 1], c = 0.5 * (h.x + l.x), u = 0.5 * (h.y + l.y), d = this.worldToLocalXY(t, e), f = C.distance(d.x, d.y, c, u), y = 0.5 * C[n(270)](h.x, h.y, l.x, l.y);
    return !(Math[n(255)](f - y) >= o) && this._inArcSide(h, l, d);
  }
  _inArcSide(t, e, n) {
    let r = [e.x - t.x, e.y - t.y], i = [n.x - t.x, n.y - t.y], o = B.cross(r, i);
    return this.direction === Mt.anticlockwise ? o > 0 : o < 0;
  }
  _measureDistance(t, e, n) {
    const r = pt;
    let i = 0.5 * (t.x + e.x), o = 0.5 * (t.y + e.y), a = 0.5 * C[r(270)](t.x, t.y, e.x, e.y), h = C.distance(n.x, n.y, i, o), l = Math.atan2(t.y - o, t.x - i), c = (Math[r(262)](n.y - o, n.x - i) - l) / Math.PI;
    return !this[r(274)](t, e, n) && (h += a, c = 0), { dist: Math[r(255)](h - a), t: c };
  }
}
Ss([p(Ot.ArcLink)], Gn.prototype, "className", 2), Ss([p(new uh())], Gn.prototype, pt(258), 2), Ss([p(z.prototype[pt(279)][pt(256)]([pt(252)]))], Gn[pt(269)], pt(279), 2), Ss([p(Mt.clockwise)], Gn[pt(269)], "direction", 2);
const he = _n;
(function() {
  const s = _n, t = da();
  for (; ; )
    try {
      if (parseInt(s(176)) / 1 + parseInt(s(182)) / 2 * (-parseInt(s(178)) / 3) + parseInt(s(180)) / 4 + -parseInt(s(156)) / 5 * (parseInt(s(163)) / 6) + -parseInt(s(170)) / 7 + parseInt(s(162)) / 8 * (-parseInt(s(159)) / 9) + parseInt(s(171)) / 10 * (-parseInt(s(165)) / 11) === 197408)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var hc = Object.defineProperty, lc = Object.getOwnPropertyDescriptor, br = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? lc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && hc(t, e, i), i;
};
function da() {
  const s = ["_measureDistance", "951708XyqVzc", "calcCtrlPoint2", "818gestMy", "_serializers", "6065qqtvRN", "BezierLink", "aabb", "45TQBaDt", "points", "push", "131152BRmYHL", "984IfIgxU", "ctrlPoint2", "66BpvWfW", "_updatePoints", "length", "ctrlPoint1", "getPoints", "49301avCXyT", "42900mSZvGI", "resetCtrlPoint", "_obb", "_autoCalcCtrlPoint", "lineWidth", "332062OJQClZ", "prototype", "432BDJOOv"];
  return (da = function() {
    return s;
  })();
}
function _n(s, t) {
  const e = da();
  return (_n = function(n, r) {
    return e[n -= 155];
  })(s, t);
}
class Ds extends z {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  translateWith(t, e) {
    const n = _n;
    return super.translateWith(t, e), this.ctrlPoint1 != null && (this.ctrlPoint1.x += t, this.ctrlPoint1.y += e), this[n(164)] != null && (this.ctrlPoint2.x += t, this.ctrlPoint2.y += e), this;
  }
  setCtrlPoint1(t) {
    this.ctrlPoint1 = t, this._matrixDirty = !0;
  }
  setCtrlPoint2(t) {
    this.ctrlPoint2 = t, this._matrixDirty = !0;
  }
  _autoCalcCtrlPoint(t, e, n) {
    let r = e.x - t.x, i = e.y - t.y;
    return { x: (e.x + t.x) / 2 + 0.382 * r, y: (e.y + t.y) / 2 - 0.382 * i };
  }
  calcCtrlPoint1(t, e, n) {
    const r = _n;
    return this.ctrlPoint1 != null ? this[r(168)] : this[r(174)](t, n, e);
  }
  calcCtrlPoint2(t, e, n) {
    return this[_n(164)] != null ? this.ctrlPoint2 : this._autoCalcCtrlPoint(e, n, t);
  }
  [he(172)]() {
    this.ctrlPoint1 = void 0, this.ctrlPoint2 = void 0, this._matrixDirty = !0;
  }
  _getOBBPoints() {
    const t = he;
    this.points = this._updatePoints();
    let e = this.points;
    const n = js._getCubicBezierExtremas(e[0], e[1], e[3], e[4]);
    if (n.length == 0)
      return e;
    let r = [e[0], e[4]];
    for (let i = 0; i < n.length; i++)
      r[t(161)](this.getPoint(n[i]));
    return r;
  }
  getPoint(t) {
    let e = this.getPoints(), n = e[0], r = e[1], i = e[3], o = e[4], a = (1 - t) * (1 - t) * (1 - t), h = 3 * (1 - t) * (1 - t) * t, l = 3 * (1 - t) * t * t, c = t * t * t;
    return { x: a * n.x + h * r.x + l * i.x + c * o.x, y: a * n.y + h * r.y + l * i.y + c * o.y };
  }
  getLocalPoint(t, e) {
    return this.getPoint(t);
  }
  [he(166)]() {
    const t = he;
    let e = this._state[t(160)];
    e[t(167)] = 0;
    const n = this._calcAZ(), r = n[0], i = n[1];
    let o = { x: (r.x + i.x) / 2, y: (r.y + i.y) / 2 }, a = this.calcCtrlPoint1(r, i, o), h = this[t(181)](r, i, o);
    return e.push(r, a, o, h, i), e;
  }
  hitTest(t, e) {
    const n = he;
    if (this._preHitTest(t, e))
      return !0;
    let r = this[n(173)][n(158)], i = this.getComputedStyle()[n(175)] || 0, o = Math.max(0.5 * i, this._pickPrecision);
    if (!r.contains(t, e, o))
      return !1;
    let a = this.worldToLocalXY(t, e);
    return this._measureDistance(a.x, a.y).dist < o;
  }
  [he(179)](t, e) {
    let n = this[he(169)](), r = n[0], i = n[1], o = n[3], a = n[4];
    return js._measureDistance(t, e, r.x, r.y, i.x, i.y, o.x, o.y, a.x, a.y);
  }
}
br([p(Ot[he(157)])], Ds[he(177)], "className", 2), br([p(new js())], Ds.prototype, "_shape", 2), br([p(z.prototype._serializers.concat([K.ctrlPoint1, K.ctrlPoint2]))], Ds.prototype, he(155), 2);
var Ph = On;
(function() {
  for (var s = On, t = fa(); ; )
    try {
      if (-parseInt(s(406)) / 1 * (-parseInt(s(401)) / 2) + -parseInt(s(408)) / 3 + -parseInt(s(412)) / 4 + -parseInt(s(413)) / 5 + parseInt(s(402)) / 6 + parseInt(s(398)) / 7 * (parseInt(s(403)) / 8) + parseInt(s(400)) / 9 * (-parseInt(s(411)) / 10) === 915202)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var cc = Object.defineProperty, uc = Object.getOwnPropertyDescriptor;
function On(s, t) {
  var e = fa();
  return (On = function(n, r) {
    return e[n -= 397];
  })(s, t);
}
function fa() {
  var s = ["853DHfCIW", "setPath", "1299906qOUcWS", "isDisplayObjectHost", "removeOutLink", "5370iEfBtq", "4211756QDPcdi", "4934550CHWNjh", "length", "49nAKufw", "prototype", "369NUWBPs", "1912GvUVpf", "5402934VHEOnc", "1936472tFgqSu", "unknow target type:", "host"];
  return (fa = function() {
    return s;
  })();
}
class kh extends z {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  clearPath() {
    var t = On;
    const e = this.path.anchorProxyList;
    for (let n = 1; n < e[t(397)] - 1; n++) {
      let r = e[n];
      r[t(409)]() && r[t(405)][t(410)](this);
    }
    e.length = 0;
  }
  [Ph(407)](t) {
    if (t.length < 2)
      throw new Error("path length is less than 2");
    this.clearPath();
    let e = t.map((n) => {
      var r = On;
      if (n instanceof N)
        return n;
      if (n instanceof E)
        return n.getAnchor($t.center);
      if (C.isLikePoint(n)) {
        let i = n;
        return new N(new dt(i.x, i.y));
      }
      throw new Error(r(404) + n);
    });
    super._setProxies(e), this._matrixDirty = !0;
  }
}
((s, t, e, n) => {
  for (var r, i = On, o = n > 1 ? void 0 : n ? uc(t, e) : t, a = s[i(397)] - 1; a >= 0; a--)
    (r = s[a]) && (o = (n ? r(t, e, o) : r(o)) || o);
  n && o && cc(t, e, o);
})([p("PathLink")], kh[Ph(399)], "className", 2);
const Ve = ga;
function ga(s, t) {
  const e = ya();
  return (ga = function(n, r) {
    return e[n -= 114];
  })(s, t);
}
function ya() {
  const s = ["8772615oQhtOS", "12108ZhuzWE", "523698PSnvic", "8984144IBpMvS", "4GePqVX", "#FED71A", "#681752", "#61649f", "426319SsLlqs", "#FA7E23", "2101554UYDDab", "#C02c38", "#2775B6", "#475164", "2810qYKpXW", "10nnTwXJ", "1205260JwSfkg"];
  return (ya = function() {
    return s;
  })();
}
(function() {
  const s = ga, t = ya();
  for (; ; )
    try {
      if (parseInt(s(128)) / 1 + parseInt(s(130)) / 2 + parseInt(s(122)) / 3 * (parseInt(s(124)) / 4) + parseInt(s(117)) / 5 * (-parseInt(s(121)) / 6) + parseInt(s(119)) / 7 + parseInt(s(123)) / 8 + parseInt(s(120)) / 9 * (-parseInt(s(118)) / 10) === 838009)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Ya = [Ve(116), "#2d2e36", Ve(129), "#FF9900", Ve(125), "#2bae85", "#248067", "#12A182", "#5e5314", "#1ba784", "#0f1423", "#4E7ca1", "#2474b5", Ve(115), "#346c9c", Ve(127), "#C06f98", "#7e2065", Ve(126), "#EE3f4d", Ve(114)];
function pc() {
  let s = Math.random() * Ya.length | 0;
  return Ya[s];
}
function Ae(s, t) {
  const e = ma();
  return (Ae = function(n, r) {
    return e[n -= 316];
  })(s, t);
}
const Q = Ae;
(function() {
  const s = Ae, t = ma();
  for (; ; )
    try {
      if (-parseInt(s(344)) / 1 * (parseInt(s(327)) / 2) + -parseInt(s(340)) / 3 + -parseInt(s(353)) / 4 * (-parseInt(s(354)) / 5) + parseInt(s(334)) / 6 + -parseInt(s(356)) / 7 + parseInt(s(326)) / 8 + parseInt(s(330)) / 9 * (parseInt(s(325)) / 10) === 380084)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var dc = Object.defineProperty, fc = Object.getOwnPropertyDescriptor, un = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? fc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && dc(t, e, i), i;
};
function ma() {
  const s = ["_calcFold2", "normalize", "begin", "fold2Offset", "_preAngle", "AutoFoldLinkAbsorb", "host", "1572590wpvWnJ", "846824UJzkwp", "1415926mySWrU", "getAngle", "beginOffsetGap", "72rQZMQy", "concat", "_needCalcOffset", "sign", "2843424tirZfb", "_serializers", "AutoFoldLink", "_shape", "getNormal", "_calcFold1Dir", "1928460iPQiVF", "_middleIndex", "length", "endOffsetGap", "1APobzi", "center", "centerOffset", "_calcAZ", "abs", "end", "_afterUpdateMatrix", "fold2", "fold1Offset", "4GkAivu", "2241210dKxAFa", "prototype", "3886428VsSgLA", "_matrixDirty", "fold1"];
  return (ma = function() {
    return s;
  })();
}
class be extends z {
  constructor(t, e, n, r, i) {
    const o = Ae;
    super(t, e, n, r, i), this.absorb = tt[o(323)];
  }
  getSegmentCount() {
    return 5;
  }
  getCtrlPoints() {
    const t = Ae;
    let e = C.mergeClosestPoints(this.points).length;
    return e < 4 ? [K.begin, K[t(349)]] : e == 4 || e == 5 ? [K.begin, K.end, K[t(317)], K.fold2] : [K[t(320)], K.end, K.fold1, K[t(351)], K.middle];
  }
  setBeginOffsetGap(t) {
    this[Ae(329)] = t, this._matrixDirty = !0;
  }
  setEndOffsetGap(t) {
    const e = Ae;
    this.endOffsetGap = t, this[e(316)] = !0;
  }
  _calcFold1(t, e) {
    const n = Ae;
    let r = this.beginOffsetGap, i = this._calcFold1Dir(t, e), o = { x: t.x + i[0] * r, y: t.y + i[1] * r }, a = this[n(352)];
    return a && (o.x += a.x, o.y += a.y), o;
  }
  [Q(318)](t, e) {
    let n = this.endOffsetGap, r = this._calcFold2Dir(t, e), i = { x: e.x + r[0] * n, y: e.y + r[1] * n }, o = this.fold2Offset;
    return o && (i.x += o.x, i.y += o.y), i;
  }
  _calcFold1Dir(t, e) {
    let n = Ga(this[Q(320)]);
    return n[0] == 0 && n[1] == 0 && (n = B.normalize([], [e.x - t.x, 0])), n;
  }
  _calcFold2Dir(t, e) {
    const n = Q;
    let r = Ga(this[n(349)]);
    return r[0] == 0 && r[1] == 0 && (r = B[n(319)]([], [t.x - e.x, 0])), r;
  }
  _updatePoints() {
    const t = Q, e = this[t(347)]();
    let n = e[0], r = e[1];
    const i = this.absorb;
    let o = this[t(339)](n, r);
    if (o[0] == 0 && Math.abs(n.x - r.x) < i) {
      let f = 0.5 * (n.x + r.x);
      n.x = f, r.x = f;
    }
    if (o[1] == 0 && Math.abs(n.y - r.y) < i) {
      let f = 0.5 * (n.y + r.y);
      n.y = f, r.y = f;
    }
    let a = this._calcFold1(n, r), h = this[t(318)](n, r);
    const l = function(f, y, I, x, m) {
      const b = Q;
      let _ = f._calcFold1Dir(y, I), k = f._calcFold2Dir(y, I);
      const v = B.dot(_, k);
      if (v > 0) {
        const W = wr(x, m, _, k);
        return [W, W];
      }
      if (v < 0) {
        const W = C.middle(x, m);
        return [wr(x, W, _, _), wr(m, W, k, k)];
      }
      const A = Ht.getLineIntersectPoint(y, x, I, m, !0);
      return A == null ? Math.abs(y.x - x.x) < 1e-7 && Math.abs(y.y - x.y) < 1e-7 ? [y, x] : Math.abs(I.x - m.x) < 1e-7 && Math[b(348)](I.y - m.y) < 1e-7 ? [I, m] : [y, I] : [A, A];
    }(this, n, r, a, h);
    let c = l[0], u = l[1];
    {
      if (C.looksSame(c, u, 0.5) == 0) {
        const y = Math.abs(C[t(328)](c.x, c.y, u.x, u.y)).toFixed(6);
        this[t(322)] != null && this._preAngle != y && (this.centerOffset = null), this[t(322)] = y;
      }
      let f = this.centerOffset;
      f && (c.x += f.x, c.y += f.y, u.x += f.x, u.y += f.y);
    }
    let d = this._state.points;
    return d[t(342)] = 0, d.push(n, a, c, u, h, r), d;
  }
  [Q(350)]() {
    const t = Q;
    super._afterUpdateMatrix(), this[t(332)]() && (this.points = this._updatePoints());
  }
  setFold1Offset(t, e) {
    const n = Q;
    let r = this[n(352)];
    r == null && (r = { x: 0, y: 0 }, this.fold1Offset = r), Ht.isHorizontal(this.getK(0.5, 0)) ? (r.y = 0, e = 0) : (r.x = 0, t = 0), r.x += t, r.y += e, this[n(316)] = !0;
  }
  setFold2Offset(t, e) {
    const n = Q;
    let r = this.fold2Offset;
    r == null && (r = { x: 0, y: 0 }, this[n(321)] = r), Ht.isHorizontal(this.getK(0.5, 4)) ? (r.y = 0, e = 0) : (r.x = 0, t = 0), r.x += t, r.y += e, this._matrixDirty = !0;
  }
  setCenterOffset(t, e) {
    const n = Q;
    let r = this.centerOffset;
    r == null && (r = { x: 0, y: 0 }, this.centerOffset = r), Ht.isHorizontal(this.getK(0.5, 2)) ? (r.x = 0, t = 0) : (r.y = 0, e = 0), r.x += t, r.y += e, this[n(316)] = !0;
  }
  resetOffset() {
    this[Q(346)] = void 0, this.fold1Offset = null, this.fold2Offset = null, this._matrixDirty = !0;
  }
}
function Xa(s, t) {
  const e = Q;
  return Math[e(348)](t[0]) > Math[e(348)](t[1]) ? s.x * Math[e(333)](t[0]) : s.y * Math[e(333)](t[1]);
}
function wr(s, t, e, n) {
  let r = Xa(s, e), i = Xa(t, n), o = e[0] != 0;
  return r > i ? o ? { x: s.x, y: t.y } : { x: t.x, y: s.y } : o ? { x: t.x, y: s.y } : { x: s.x, y: t.y };
}
function Ga(s, t, e) {
  const n = Q;
  let r = s.anchor, i = s.host, o = [0, 0];
  if (r instanceof Me)
    o = r.getNormal();
  else if (r instanceof mt)
    o = r[n(338)]();
  else if (r instanceof Jt) {
    let a = r.segIndex, h = r.t, l = i.getLocalPoint(h, a);
    if (i instanceof E) {
      let c = i._positionToLocalPoint($t[n(345)]), u = l.x - c.x, d = l.y - c.y;
      o = Math[n(348)](u) > Math.abs(d) ? [Math.sign(u), 0] : [0, Math[n(333)](d)];
    } else if (i instanceof z) {
      let c = i.points[a], u = i.points[a + 1];
      o = B[n(319)]([], [u.x - c.x, u.y - c.y]), o = [-o[1], o[0]];
    }
  }
  return s[n(324)] && s.host.scaleX < 0 && (o[0] = -o[0]), s.host && s.host.scaleY < 0 && (o[1] = -o[1]), o = Math.abs(o[0]) > Math.abs(o[1]) ? [Math.sign(o[0]), 0] : [0, Math.sign(o[1])], o;
}
un([p(Ot[Q(336)])], be[Q(355)], "className", 2), un([p(new ch())], be.prototype, Q(337), 2), un([p(15)], be.prototype, "beginOffsetGap", 2), un([p([2, 0.5])], be.prototype, Q(341), 2), un([p(15)], be.prototype, "endOffsetGap", 2), un([p(z.prototype._serializers[Q(331)](["beginOffsetGap", Q(343), Ot[Q(352)], Ot.fold2Offset, Ot.centerOffset]))], be[Q(355)], Q(335), 2);
const H = rs;
function rs(s, t) {
  const e = Ia();
  return (rs = function(n, r) {
    return e[n -= 273];
  })(s, t);
}
(function() {
  const s = rs, t = Ia();
  for (; ; )
    try {
      if (parseInt(s(276)) / 1 + parseInt(s(300)) / 2 * (parseInt(s(306)) / 3) + -parseInt(s(274)) / 4 + -parseInt(s(279)) / 5 * (parseInt(s(289)) / 6) + parseInt(s(299)) / 7 * (parseInt(s(285)) / 8) + parseInt(s(291)) / 9 + parseInt(s(301)) / 10 === 266647)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var gc = Object.defineProperty, yc = Object.getOwnPropertyDescriptor, Va = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? yc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && gc(t, e, i), i;
};
function Ia() {
  const s = ["min", "_frameWidth", "resizeToFrame", "48GRbmaU", "setSprite", "557892ABWurG", "autoSize", "update", "_frameCount", "_serializers", "_currentFrame", "_frameIndex", "totalColumns", "136402MbabCn", "6MCqFkU", "8960030lOJWXd", "width", "pause", "shapeSize", "frameIndex", "202242julEKp", "height", "_autoSize", "totalRows", "2006072xrPEFG", "frameCount", "68286sNmrTe", "_timer", "duration", "299900TqHqIS", "play", "prototype", "_duration", "_frameHeight", "setImage", "8ZLOMxz"];
  return (Ia = function() {
    return s;
  })();
}
class Hr extends us {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    const o = rs;
    super(t, e, n, r, i), this[o(297)] = 0, this._frameCount = 1, this[o(273)] = 1, this.totalColumns = 1, this._frameWidth = 1, this._frameHeight = 1, this._duration = 1e3, this[o(296)] = 0, this[o(308)] = !0;
  }
  changeSprite(t) {
    const e = rs;
    t.frameIndex != null && (this[e(305)] = t.frameIndex), t[e(275)] != null && (this.frameCount = t[e(275)]), t.duration != null && (this.duration = t.duration), this[e(296)] = this.frameIndex, this[e(293)]();
  }
  [H(290)](t, e) {
    const n = H;
    return this._frameIndex = e.frameIndex || 0, this._frameCount = e.frameCount || 1, this.totalRows = e.totalRows || 1, this.totalColumns = e[n(298)] || 1, e[n(278)] != null && (this._duration = e.duration), this._currentFrame = this[n(297)], this.setImage(t, !0);
  }
  setImage(t, e) {
    const n = H;
    let r = this;
    return super[n(284)](t, e).then((i) => {
      const o = n;
      return i instanceof HTMLImageElement && (r._frameWidth = i[o(302)] / this.totalColumns, r._frameHeight = i.height / this.totalRows, this._autoSize && r[o(288)](), r[o(280)]()), i;
    });
  }
  _drawImage(t, e) {
    const n = H;
    let r = this._drawContentDesc[n(304)], i = Math.floor(this[n(296)] / this.totalColumns), o = this._currentFrame % this[n(298)] * this._frameWidth, a = i * this._frameHeight, h = 0.5 * -r.width, l = 0.5 * -r[n(307)];
    t.drawImage(e, o, a, this._frameWidth, this[n(283)], h, l, r[n(302)], r[n(307)]);
  }
  resizeToFrame() {
    const t = H;
    return this.imageObject != null && this.imageObject.width != this[t(287)] && this.imageObject[t(307)] != this._frameHeight && this.resize(this._frameWidth, this._frameHeight), this;
  }
  play() {
    const t = H;
    let e = this;
    return this._frameCount <= 1 || (this[t(303)](), this[t(277)] = setInterval(() => {
      const n = t;
      e[n(294)] <= 1 || e[n(282)] <= 0 || (e._currentFrame++, e._currentFrame >= e._frameIndex + e._frameCount && (e[n(296)] = e._frameIndex), e.update());
    }, this._duration / this._frameCount), e.update()), this;
  }
  pause() {
    return clearInterval(this._timer), this;
  }
  [H(293)]() {
    super[H(293)](), this._autoSize && this.resizeToFrame();
  }
  set [H(305)](t) {
    const e = H;
    t !== this._frameIndex && (this._frameIndex = Math[e(286)](0, t), this._currentFrame = this[e(297)], this.update());
  }
  get [H(305)]() {
    return this._frameIndex;
  }
  set frameCount(t) {
    const e = H;
    t !== this._frameCount && (this._frameCount = Math.max(1, t), this._currentFrame = this[e(297)], this.update());
  }
  get frameCount() {
    return this[H(294)];
  }
  set duration(t) {
    const e = H;
    t !== this._duration && (this._duration = t, this[e(293)]());
  }
  get duration() {
    return this[H(282)];
  }
  set [H(292)](t) {
    const e = H;
    this._autoSize = t, t && this[e(288)]();
  }
  get autoSize() {
    return this[H(308)];
  }
  destroy() {
    const t = H;
    super.destroy(), this[t(303)]();
  }
}
function xa(s, t) {
  const e = ba();
  return (xa = function(n, r) {
    return e[n -= 232];
  })(s, t);
}
Va([p("SpriteNode")], Hr[H(281)], "className", 2), Va([p(us.prototype[H(295)].concat([H(305), H(275), H(273), "totalColumns", "duration", "autoSize"]))], Hr[H(281)], "_serializers", 2);
const j = xa;
(function() {
  const s = xa, t = ba();
  for (; ; )
    try {
      if (-parseInt(s(236)) / 1 + -parseInt(s(267)) / 2 * (parseInt(s(251)) / 3) + parseInt(s(265)) / 4 * (-parseInt(s(250)) / 5) + -parseInt(s(260)) / 6 * (-parseInt(s(240)) / 7) + -parseInt(s(258)) / 8 + -parseInt(s(253)) / 9 + parseInt(s(249)) / 10 === 817756)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), [new mt(Gt.lt, Y.ADJUST), new mt(Gt.rt, Y.ADJUST), new mt(Gt.lb, Y.ADJUST), new mt(Gt.rb, Y.ADJUST), new mt(Gt.lm, Y[j(238)]), new mt(Gt.ct, Y.CONNECT_EDIT), new mt(Gt.rm, Y.CONNECT_EDIT), new mt(Gt.cb, Y.CONNECT_EDIT), new mt(Gt[j(241)], Y.ADJUST), new Kn(Gt.auto)].forEach((s) => {
  const t = j;
  hn.DefaultAnchors[t(246)](s[t(271)], s);
}), M[j(259)](nt[j(248)], (s) => s[j(254)][0]), M._sysRegFunction(nt[j(261)], (s) => s.points[s.points.length - 1]), M[j(259)](nt.LinkCenter, (s) => s.getPoint(0.5));
let ds = new wt(nt.LinkBegin, Y[j(238)] | Y[j(268)]);
ds.pointermoveHandler = function(s, t, e) {
  const n = j;
  t[n(232)][n(244)] && (s instanceof be && s.resetOffset(), s.setBegin({ x: e.x, y: e.y }), s.updateMatrix());
};
let is = new wt(nt.LinkEnd, Y[j(238)] | Y[j(268)]);
is.pointermoveHandler = function(s, t, e) {
  t.inputSystem.isPointerDown && (s instanceof be && s.resetOffset(), s.setEnd({ x: e.x, y: e.y }), s.updateMatrix());
}, [ds, is, new wt(nt.LinkCenter, Y.CONNECT)].forEach((s) => {
  const t = j;
  Cn[t(270)][t(246)](s.name, s);
});
{
  M._sysRegFunction(nt.AutoFoldLinkCenter, (n) => C.middle(n.points[2], n.points[3])), M._sysRegFunction(nt.AutoFoldLinkFold1, (n) => n.points[1]), M._sysRegFunction(nt[j(243)], (n) => n.points[4]);
  let s = new wt(nt.AutoFoldLinkFold1, Y.ADJUST);
  s.pointermoveHandler = function(n, r, i) {
    const o = j;
    if (r[o(232)].isPointerDown) {
      let c = N.calcPointByAnchor(n, this);
      const u = i.x - c.x, d = i.y - c.y;
      return n[o(269)](u, d), void n.updateMatrix();
    }
    let a = n.points[0], h = n.points[1], l = null;
    l = Ht.isHorizontal(n.getK(0.5, 0)) ? h.x > a.x ? at[o(262)] : at.e_resize : h.y > a.y ? at.s_resize : at[o(233)], r[o(263)](l);
  };
  let t = new wt(nt[j(243)], Y.ADJUST);
  t.pointermoveHandler = function(n, r, i) {
    const o = j;
    if (r.inputSystem.isPointerDown) {
      let u = N.calcPointByAnchor(n, this);
      const d = i.x - u.x, f = i.y - u.y;
      return n[o(234)](d, f), void n[o(245)]();
    }
    const a = Ht[o(255)](n[o(239)](0.5, 4));
    let h = n[o(254)][4], l = n.points[5], c = null;
    c = a ? h.x > l.x ? at.w_resize : at.e_resize : h.y > l.y ? at[o(237)] : at[o(233)], r.setCursor(c);
  };
  let e = new wt(nt.AutoFoldLinkCenter, Y.ADJUST);
  e[j(235)] = function(n, r, i) {
    if (r.inputSystem.isPointerDown) {
      let a = N.calcPointByAnchor(n, this);
      const h = i.x - a.x, l = i.y - a.y;
      return n.setCenterOffset(h, l), void n.updateMatrix();
    }
    let o = null;
    o = Ht.isHorizontal(n.getK(0.5, 2)) ? at.s_resize : at.e_resize, r.setCursor(o);
  }, [ds, is, new Jt(K.mid1, 1, 1), new Jt(K.mid2, 1, 2), s, t, e].forEach((n) => {
    ch.DefaultAnchors.set(n.name, n);
  });
}
{
  M._sysRegFunction(nt.QuadBezierLinkCtrlPoint, (t) => {
    const e = j;
    if (t[e(257)] != null)
      return t[e(257)];
    let n = t.getPoints();
    return t.getCtrlPoint(n[0].x, n[0].y, n[2].x, n[2].y);
  });
  let s = new wt(nt.QuadBezierLinkCtrlPoint, Y.ADJUST);
  s.pointermoveHandler = function(t, e, n) {
    const r = j;
    e.inputSystem[r(244)] && (t.ctrlPoint == null ? t[r(247)](N[r(252)](t, this)) : (t.ctrlPoint.x += n.x - t.ctrlPoint.x, t.ctrlPoint.y += n.y - t.ctrlPoint.y, t.setCtrlPoint(t.ctrlPoint)));
  }, [ds, is, s, new wt(nt.LinkCenter, Y.CONNECT)].forEach((t) => {
    zs.DefaultAnchors.set(t.name, t);
  });
}
function ba() {
  const s = ["3uKxnJJ", "calcPointByAnchor", "8248896xLWyYE", "points", "isHorizontal", "ctrlPoint2", "ctrlPoint", "5203040nXRJAS", "_sysRegFunction", "24JmqAjq", "LinkEnd", "w_resize", "setCursor", "getPoints", "4WQBBWI", "forEach", "905902JqZASE", "ADJUST", "setFold1Offset", "DefaultAnchors", "name", "ctrlPoint1", "inputSystem", "n_resize", "setFold2Offset", "pointermoveHandler", "54662NUwCVH", "s_resize", "CONNECT_EDIT", "getK", "550459cptgPd", "center", "setCtrlPoint1", "AutoFoldLinkFold2", "isPointerDown", "updateMatrix", "set", "setCtrlPoint", "LinkBegin", "36726000ixCPuS", "5474275iZLsUd"];
  return (ba = function() {
    return s;
  })();
}
{
  M._sysRegFunction(nt.BezierLinkCtrlPoint1, (e) => {
    const n = j;
    return e.ctrlPoint1 != null ? e[n(272)] : e.getPoints()[1];
  }), M._sysRegFunction(nt.BezierLinkCtrlPoint2, (e) => {
    const n = j;
    return e.ctrlPoint2 != null ? e.ctrlPoint2 : e[n(264)]()[3];
  });
  let s = new wt(nt.BezierLinkCtrlPoint1, Y[j(268)]);
  s.pointermoveHandler = function(e, n, r) {
    const i = j;
    n.inputSystem.isPointerDown && (e.ctrlPoint1 == null ? e[i(242)](N.calcPointByAnchor(e, this)) : (e.ctrlPoint1.x += r.x - e[i(272)].x, e.ctrlPoint1.y += r.y - e.ctrlPoint1.y, e[i(242)](e.ctrlPoint1)));
  };
  let t = new wt(nt.BezierLinkCtrlPoint2, Y.ADJUST);
  t[j(235)] = function(e, n, r) {
    const i = j;
    n[i(232)].isPointerDown && (e[i(256)] == null ? e.setCtrlPoint2(N[i(252)](e, this)) : (e[i(256)].x += r.x - e.ctrlPoint2.x, e[i(256)].y += r.y - e.ctrlPoint2.y, e.setCtrlPoint2(e[i(256)])));
  }, [ds, is, s, t][j(266)]((e) => {
    const n = j;
    js[n(270)].set(e[n(271)], e);
  });
}
function Lh(s, t) {
  var e = wa();
  return (Lh = function(n, r) {
    return e[n -= 385];
  })(s, t);
}
function wa() {
  var s = ["10119373IQlsqE", "2487360UOEEbB", "12SfKYID", "2503140otCXVn", "94RbmMaU", "139959gHmaKq", "32lEzzuP", "1146530yFyjaF", "177hELePJ", "16316cFTbpc", "5466NkPGVI"];
  return (wa = function() {
    return s;
  })();
}
(function() {
  for (var s = Lh, t = wa(); ; )
    try {
      if (-parseInt(s(390)) / 1 * (-parseInt(s(395)) / 2) + -parseInt(s(388)) / 3 * (-parseInt(s(389)) / 4) + -parseInt(s(394)) / 5 + -parseInt(s(393)) / 6 * (parseInt(s(387)) / 7) + -parseInt(s(386)) / 8 * (parseInt(s(385)) / 9) + -parseInt(s(392)) / 10 + parseInt(s(391)) / 11 === 278358)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const vr = Object.freeze(Object.defineProperty({ __proto__: null, AENode: es, Anchor: bt, AnchorProxy: N, AnchorUsageType: Y, Animation: oh, ArcLink: Gn, ArrowShape: Ci, Assets: as, AssetsClass: ih, AutoAnchor: Kn, AutoFoldLink: be, BezierLink: Ds, Camera: wh, CameraEvent: bh, CanvasNode: Sh, Collection: me, ConnectToNodePosition: Gt, Cursor: at, Debug: rn, DefaultDarkTheme: Br, DefaultLightTheme: Vn, DiamondShape: Ni, Direction: Mt, DomUtil: We, Edge: Nr, EllipseNode: jr, EllipseShape: Ti, EventBase: sn, EventTarget: ve, FixedPointAnchor: dt, FontInfo: qe, FontUtil: _r, ForceDirectLayout: ic, FunctionAnchor: wt, FunctionName: nt, GeomUtils: ht, Graph: $n, GraphSystem: Ln, HandlerLayer: ir, HtmlNode: Wr, ImageNode: us, ImageUtil: qn, InputEvent: wl, InputSystem: ph, Intersect: an, JTType: Eh, Keyboard: dh, LShapeLink: Jn, Layer: Fe, Layout: Es, LayoutSystem: fh, LinearGradient: jn, Link: z, LinkConst: Ot, LinkPosition: K, NDCAnchor: Me, NE: ct, NEHelper: ls, Node: E, NodeHelper: ce, NodePositionAnchor: mt, OBB: ue, ObjectName: Oh, Observable: Be, Path: yl, PathLink: kh, Point: C, PolygonShape: ee, QuadBezierLink: As, RadialGradient: Wn, RectPosition: $t, RectPositionNormalized: Ns, RectPositionUnitNormals: Xr, RectShape: qs, Rectangle: O, RegShape: nh, RegSystem: M, ResourceSystem: ft, ResourceSystemBase: Za, SegmentAnchor: Jt, SelectedGroup: _h, SerializerSystem: Ms, Shape: hn, ShapeBuilder: $e, ShapeNode: Cs, SpriteNode: Hr, Stage: or, StageEvent: Zn, StageMode: Zt, Style: Ut, StylePattern: fe, StyleSystem: gh, TextAlign: At, TextBaseline: Dt, TextNode: on, TextPosition: Wt, Theme: An, ThemeContent: ko, TipNode: Yn, TipShape: Mi, Transform: xt, TriangleShape: Ei, VERSION: Rs, Vertext: xn, VideoNode: Un, ZShapeLink: Xn, _V: Th, convertToAnchorProxy: Dr, copyKeyboardEvent: Mr, copyMouseEvent: bl, distance: dn, geom: Ht, newtonsMethod: vi, pointIntersectNode: Hh, randomColor: pc, setProto: p, util: je, vec2: B }, Symbol.toStringTag, { value: "Module" })), ie = va;
function va(s, t) {
  const e = _a();
  return (va = function(n, r) {
    return e[n -= 148];
  })(s, t);
}
function _a() {
  const s = ["NodePositionAnchor", "5tKvUgZ", "HtmlNode", "Layer", "_sysRegClass", "TextNode", "6xHuWOG", "18651590pNVbol", "1321512GgkrAR", "RegSystem", "ZShapeLink", "11FYUsxG", "ShapeNode", "prototype", "522932BOYiwo", "54eQGsvS", "CanvasNode", "2992116blcTdl", "97024fbzzcA", "FixedPointAnchor", "949151mrdFVC", "ImageNode", "1085511lbsiOB"];
  return (_a = function() {
    return s;
  })();
}
(function() {
  const s = va, t = _a();
  for (; ; )
    try {
      if (parseInt(s(166)) / 1 + -parseInt(s(160)) / 2 + -parseInt(s(151)) / 3 + parseInt(s(169)) / 4 * (-parseInt(s(153)) / 5) + -parseInt(s(158)) / 6 * (parseInt(s(149)) / 7) + parseInt(s(170)) / 8 * (-parseInt(s(167)) / 9) + -parseInt(s(159)) / 10 * (-parseInt(s(163)) / 11) === 409108)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), ["Style", ie(155), "Node", ie(157), ie(150), "VideoNode", ie(168), ie(164), ie(154), "EllipseNode", "TipNode", "SpriteNode", "Link", "LShapeLink", ie(162), "QuadBezierLink", "ArcLink", "BezierLink", "PathLink", "AutoFoldLink", "NDCAnchor", ie(148), "AutoAnchor", "SegmentAnchor", ie(152), "FunctionAnchor"].forEach((s) => {
  const t = ie;
  vr[s] == null && console.error("class not exist name:" + s);
  let e = vr[s];
  e[t(165)].className == null && console.error(".prototype.className is null:" + s), vr[t(161)][t(156)](e);
});
export {
  es as AENode,
  bt as Anchor,
  N as AnchorProxy,
  Y as AnchorUsageType,
  oh as Animation,
  Gn as ArcLink,
  Ci as ArrowShape,
  as as Assets,
  ih as AssetsClass,
  Kn as AutoAnchor,
  be as AutoFoldLink,
  Ds as BezierLink,
  wh as Camera,
  bh as CameraEvent,
  Sh as CanvasNode,
  me as Collection,
  Gt as ConnectToNodePosition,
  at as Cursor,
  rn as Debug,
  Br as DefaultDarkTheme,
  Vn as DefaultLightTheme,
  Ni as DiamondShape,
  Mt as Direction,
  We as DomUtil,
  Nr as Edge,
  jr as EllipseNode,
  Ti as EllipseShape,
  sn as EventBase,
  ve as EventTarget,
  dt as FixedPointAnchor,
  qe as FontInfo,
  _r as FontUtil,
  ic as ForceDirectLayout,
  wt as FunctionAnchor,
  nt as FunctionName,
  ht as GeomUtils,
  $n as Graph,
  Ln as GraphSystem,
  ir as HandlerLayer,
  Wr as HtmlNode,
  us as ImageNode,
  qn as ImageUtil,
  wl as InputEvent,
  ph as InputSystem,
  an as Intersect,
  Eh as JTType,
  dh as Keyboard,
  Jn as LShapeLink,
  Fe as Layer,
  Es as Layout,
  fh as LayoutSystem,
  jn as LinearGradient,
  z as Link,
  Ot as LinkConst,
  K as LinkPosition,
  Me as NDCAnchor,
  ct as NE,
  ls as NEHelper,
  E as Node,
  ce as NodeHelper,
  mt as NodePositionAnchor,
  ue as OBB,
  Oh as ObjectName,
  Be as Observable,
  yl as Path,
  kh as PathLink,
  C as Point,
  ee as PolygonShape,
  As as QuadBezierLink,
  Wn as RadialGradient,
  $t as RectPosition,
  Ns as RectPositionNormalized,
  Xr as RectPositionUnitNormals,
  qs as RectShape,
  O as Rectangle,
  nh as RegShape,
  M as RegSystem,
  ft as ResourceSystem,
  Za as ResourceSystemBase,
  Jt as SegmentAnchor,
  _h as SelectedGroup,
  Ms as SerializerSystem,
  hn as Shape,
  $e as ShapeBuilder,
  Cs as ShapeNode,
  Hr as SpriteNode,
  or as Stage,
  Zn as StageEvent,
  Zt as StageMode,
  Ut as Style,
  fe as StylePattern,
  gh as StyleSystem,
  At as TextAlign,
  Dt as TextBaseline,
  on as TextNode,
  Wt as TextPosition,
  An as Theme,
  ko as ThemeContent,
  Yn as TipNode,
  Mi as TipShape,
  xt as Transform,
  Ei as TriangleShape,
  Rs as VERSION,
  xn as Vertext,
  Un as VideoNode,
  Xn as ZShapeLink,
  Th as _V,
  Dr as convertToAnchorProxy,
  Mr as copyKeyboardEvent,
  bl as copyMouseEvent,
  dn as distance,
  Ht as geom,
  vi as newtonsMethod,
  Hh as pointIntersectNode,
  pc as randomColor,
  p as setProto,
  je as util,
  B as vec2
};
